48 struct SelectOpInterface
49 :
public BufferDeallocationOpInterface::ExternalModel<SelectOpInterface,
56 std::pair<Value, Value>
60 auto selectOp = cast<arith::SelectOp>(op);
61 assert(value == selectOp.getResult() &&
62 "Value not defined by this operation");
65 if (!state.getOwnership(selectOp.getTrueValue(), block).isUnique() ||
66 !state.getOwnership(selectOp.getFalseValue(), block).isUnique())
67 return state.getMemrefWithUniqueOwnership(builder, value,
71 op->
getLoc(), selectOp.getCondition(),
72 state.getOwnership(selectOp.getTrueValue(), block).getIndicator(),
73 state.getOwnership(selectOp.getFalseValue(), block).getIndicator());
83 SelectOp::attachInterface<SelectOpInterface>(*ctx);
static llvm::ManagedStatic< PassManagerOptions > options
Block represents an ordered list of Operations.
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
MLIRContext is the top-level object for a collection of MLIR operations.
This class helps build Operations.
Operation * create(const OperationState &state)
Creates an operation given the fields represented as an OperationState.
Operation is the basic unit of execution within MLIR.
OpResult getResult(unsigned idx)
Get the 'idx'th result of this operation.
Location getLoc()
The source location the operation was defined or derived from.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Block * getParentBlock()
Return the Block in which this Value is defined.
This class collects all the state that we need to perform the buffer deallocation pass with associate...
void registerBufferDeallocationOpInterfaceExternalModels(DialectRegistry ®istry)
Include the generated interface declarations.
Options for BufferDeallocationOpInterface-based buffer deallocation.