20 template <
class AttrT>
23 if (!isa<AttrT>(iter))
24 return op->
emitOpError(
"expected op to return array of ")
25 << AttrT::getMnemonic() <<
" attributes";
34 auto iface = cast<AccessGroupOpInterface>(op);
35 ArrayAttr accessGroups = iface.getAccessGroupsOrNull();
39 return isArrayOf<AccessGroupAttr>(op, accessGroups);
48 auto iface = cast<AliasAnalysisOpInterface>(op);
50 if (
auto aliasScopes = iface.getAliasScopesOrNull())
51 if (failed(isArrayOf<AliasScopeAttr>(op, aliasScopes)))
54 if (
auto noAliasScopes = iface.getNoAliasScopesOrNull())
55 if (failed(isArrayOf<AliasScopeAttr>(op, noAliasScopes)))
58 ArrayAttr tags = iface.getTBAATagsOrNull();
62 return isArrayOf<TBAATagAttr>(op, tags);
82 return {getDst(), getSrc()};
86 return {getDst(), getSrc()};
90 return {getDst(), getSrc()};
102 return llvm::filter_to_vector(getArgOperands(), [](
Value arg) {
103 return isa<LLVMPointerType>(arg.
getType());
107 #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.
InFlightDiagnostic emitOpError(const Twine &message={})
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
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.
Include the generated interface declarations.