21 template <
class AttrT>
24 if (!isa<AttrT>(iter))
25 return op->
emitOpError(
"expected op to return array of ")
26 << AttrT::getMnemonic() <<
" attributes";
35 auto iface = cast<AccessGroupOpInterface>(op);
36 ArrayAttr accessGroups = iface.getAccessGroupsOrNull();
40 return isArrayOf<AccessGroupAttr>(op, accessGroups);
49 auto iface = cast<AliasAnalysisOpInterface>(op);
51 if (
auto aliasScopes = iface.getAliasScopesOrNull())
52 if (failed(isArrayOf<AliasScopeAttr>(op, aliasScopes)))
55 if (
auto noAliasScopes = iface.getNoAliasScopesOrNull())
56 if (failed(isArrayOf<AliasScopeAttr>(op, noAliasScopes)))
59 ArrayAttr tags = iface.getTBAATagsOrNull();
63 return isArrayOf<TBAATagAttr>(op, tags);
72 auto iface = cast<DereferenceableOpInterface>(op);
74 if (
auto derefAttr = iface.getDereferenceableOrNull())
78 "expected op to return a single LLVM pointer type");
100 return {getDst(), getSrc()};
104 return {getDst(), getSrc()};
108 return {getDst(), getSrc()};
120 return llvm::filter_to_vector(getArgOperands(), [](
Value arg) {
121 return isa<LLVMPointerType>(arg.
getType());
125 #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.