24 #include "mlir/Dialect/MemRef/IR/MemRefOpsDialect.cpp.inc"
44 void mlir::memref::MemRefDialect::initialize() {
47 #include "mlir/Dialect/MemRef/IR/MemRefOps.cpp.inc"
49 addInterfaces<MemRefInlinerInterface>();
50 declarePromisedInterface<ConvertToLLVMPatternInterface, MemRefDialect>();
51 declarePromisedInterfaces<bufferization::AllocationOpInterface, AllocOp,
52 AllocaOp, ReallocOp>();
53 declarePromisedInterfaces<RuntimeVerifiableOpInterface, CastOp, ExpandShapeOp,
54 LoadOp, ReinterpretCastOp, StoreOp, SubViewOp>();
55 declarePromisedInterfaces<ValueBoundsOpInterface, AllocOp, AllocaOp, CastOp,
56 DimOp, GetGlobalOp, RankOp, SubViewOp>();
57 declarePromisedInterface<DestructurableTypeInterface, MemRefType>();
64 if (!hasEffect<MemoryEffects::Free>(user, allocValue))
67 if (isa<memref::ReallocOp>(user))
static bool isLegalToInline(InlinerInterface &interface, Region *src, Region *insertRegion, bool shouldCloneInlinedRegion, IRMapping &valueMapping)
Utility to check that all of the operations within 'src' can be inlined.
This is the interface that must be implemented by the dialects of operations to be inlined.
DialectInlinerInterface(Dialect *dialect)
This is a utility class for mapping one set of IR entities to another.
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
user_range getUsers() const
std::optional< Operation * > findDealloc(Value allocValue)
Finds a single dealloc operation for the given allocated value.
Include the generated interface declarations.