22 template <
class AttrT>
25 if (!isa<AttrT>(iter))
26 return op->
emitOpError(
"expected op to return array of ")
27 << AttrT::getMnemonic() <<
" attributes";
36 auto iface = cast<AccessGroupOpInterface>(op);
37 ArrayAttr accessGroups = iface.getAccessGroupsOrNull();
41 return isArrayOf<AccessGroupAttr>(op, accessGroups);
50 auto iface = cast<AliasAnalysisOpInterface>(op);
52 if (
auto aliasScopes = iface.getAliasScopesOrNull())
53 if (failed(isArrayOf<AliasScopeAttr>(op, aliasScopes)))
56 if (
auto noAliasScopes = iface.getNoAliasScopesOrNull())
57 if (failed(isArrayOf<AliasScopeAttr>(op, noAliasScopes)))
60 ArrayAttr tags = iface.getTBAATagsOrNull();
64 return isArrayOf<TBAATagAttr>(op, tags);
73 auto iface = cast<DereferenceableOpInterface>(op);
75 if (
auto derefAttr = iface.getDereferenceableOrNull())
79 "expected op to return a single LLVM pointer type");
101 return {getDst(), getSrc()};
105 return {getDst(), getSrc()};
109 return {getDst(), getSrc()};
121 return llvm::filter_to_vector(getArgOperands(), [](
Value arg) {
122 return isa<LLVMPointerType>(arg.
getType());
126 #include "mlir/Dialect/LLVMIR/LLVMInterfaces.cpp.inc"
static LogicalResult isArrayOf(Operation *op, ArrayAttr array)
Verifies that all elements of array are instances of Attr.
Attributes are known-constant values of operations.
Operation is the basic unit of execution within MLIR.
OpResult getResult(unsigned idx)
Get the 'idx'th result of this operation.
InFlightDiagnostic emitOpError(const Twine &message={})
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
unsigned getNumResults()
Return the number of results held by this operation.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Type getType() const
Return the type of this value.
LogicalResult verifyAliasAnalysisOpInterface(Operation *op)
Verifies the alias analysis attributes of memory operations that implement the alias analysis interfa...
LogicalResult verifyAccessGroupOpInterface(Operation *op)
Verifies the access groups attribute of memory operations that implement the access group interface.
LogicalResult verifyDereferenceableOpInterface(Operation *op)
Verifies that the operation implementing the dereferenceable interface has exactly one result of LLVM...
Include the generated interface declarations.