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}};
Base class for generic analysis states.
This class represents an operand of an operation.
Operation is the basic unit of execution within MLIR.
Include the generated interface declarations.
Bufferizable ops that implement the DestinationStyleOpInterface can use this external model base clas...
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