9#ifndef MLIR_DIALECT_BUFFERIZATION_IR_DSTBUFFERIZABLEOPINTERFACEIMPL_H_
10#define MLIR_DIALECT_BUFFERIZATION_IR_DSTBUFFERIZABLEOPINTERFACEIMPL_H_
21template <
typename ConcreteModel,
typename ConcreteOp>
23 :
public BufferizableOpInterface::ExternalModel<ConcreteModel, ConcreteOp> {
27 assert(isa<DestinationStyleOpInterface>(op) &&
28 "expected that op implements DestinationStyleOpInterface");
35 auto dstOp = cast<DestinationStyleOpInterface>(op);
36 return dstOp.isDpsInit(&opOperand);
42 auto dstOp = cast<DestinationStyleOpInterface>(op);
43 if (dstOp.isDpsInit(&opOperand))
44 return {{dstOp.getTiedOpResult(&opOperand), BufferRelation::Equivalent}};
52 auto result = dyn_cast<OpResult>(value);
55 auto dstOp = cast<DestinationStyleOpInterface>(op);
56 return {{dstOp.getTiedOpOperand(
result), BufferRelation::Equivalent}};
Base class for generic analysis states.
This class represents an operand of an operation.
Operation is the basic unit of execution within MLIR.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Include the generated interface declarations.
Bufferizable ops that implement the DestinationStyleOpInterface can use this external model base clas...
AliasingOpOperandList getAliasingOpOperands(Operation *op, Value value, const AnalysisState &state) const
AliasingValueList getAliasingValues(Operation *op, OpOperand &opOperand, const AnalysisState &state) const
bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, const AnalysisState &state) const
bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, const AnalysisState &state) const