22template <
typename ConcreteModel,
typename ConcreteOp>
23struct BranchLikeOpInterface
24 :
public BranchOpBufferizableOpInterfaceExternalModel<ConcreteModel,
26 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand,
27 const AnalysisState &state)
const {
31 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand,
32 const AnalysisState &state)
const {
36 LogicalResult verifyAnalysis(Operation *op,
37 const AnalysisState &state)
const {
41 LogicalResult bufferize(Operation *op, RewriterBase &rewriter,
42 const BufferizationOptions &
options,
43 BufferizationState &state)
const {
50struct BranchOpInterface
51 :
public BranchLikeOpInterface<BranchOpInterface, cf::BranchOp> {};
54struct CondBranchOpInterface
55 :
public BranchLikeOpInterface<CondBranchOpInterface, cf::CondBranchOp> {};
64 cf::BranchOp::attachInterface<BranchOpInterface>(*ctx);
65 cf::CondBranchOp::attachInterface<CondBranchOpInterface>(*ctx);
static llvm::ManagedStatic< PassManagerOptions > options
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.
void registerBufferizableOpInterfaceExternalModels(DialectRegistry ®istry)
Include the generated interface declarations.