MLIR  20.0.0git
Functions
mlir::bufferization::deallocation_impl Namespace Reference

Functions

FailureOr< Operation * > insertDeallocOpForReturnLike (DeallocationState &state, Operation *op, ValueRange operands, SmallVectorImpl< Value > &updatedOperandOwnerships)
 Insert a bufferization.dealloc operation right before op which has to be a terminator without any successors. More...
 

Function Documentation

◆ insertDeallocOpForReturnLike()

FailureOr< Operation * > mlir::bufferization::deallocation_impl::insertDeallocOpForReturnLike ( DeallocationState state,
Operation op,
ValueRange  operands,
SmallVectorImpl< Value > &  updatedOperandOwnerships 
)

Insert a bufferization.dealloc operation right before op which has to be a terminator without any successors.

Note that it is not required to have the ReturnLike trait attached. The MemRef values in the operands argument will be added to the list of retained values and their updated ownership values will be appended to the updatedOperandOwnerships list. op is not modified in any way. Returns failure if at least one of the MemRefs to deallocate does not have 'Unique' ownership (likely as a result of an incorrect implementation of the process or materializeUniqueOwnershipForMemref interface method) or the original op.

Definition at line 281 of file BufferDeallocationOpInterface.cpp.