/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir::accomp { /// OpenACC/OpenMP operations with one or more regions holding executable code. class RecipeInterface; } // namespace mlir::accomp namespace mlir::accomp { /// OpenACC/OpenMP operations with one or more regions holding executable code. namespace detail { struct RecipeInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::Block *(*getAllocaBlock)(const Concept *impl, ::mlir::Operation *, ::mlir::Region &); }; template class Model : public Concept { public: using Interface = ::mlir::accomp::RecipeInterface; Model() : Concept{getAllocaBlock} {} static inline ::mlir::Block *getAllocaBlock(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Region & region); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::accomp::RecipeInterface; FallbackModel() : Concept{getAllocaBlock} {} static inline ::mlir::Block *getAllocaBlock(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Region & region); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; ::mlir::Block *getAllocaBlock(::mlir::Operation *tablegen_opaque_val, ::mlir::Region ®ion) const; }; }; template struct RecipeInterfaceTrait; } // namespace detail class RecipeInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::RecipeInterfaceTrait {}; /// For the given region of the operation return the block /// inside the region, where an alloca-like operation should be inserted. /// The default implementation returns the entry block of the region. ::mlir::Block *getAllocaBlock(::mlir::Region & region); }; } // namespace mlir::accomp namespace mlir::accomp::detail { template struct RecipeInterfaceTrait : public ::mlir::OpInterface::Trait { /// For the given region of the operation return the block /// inside the region, where an alloca-like operation should be inserted. /// The default implementation returns the entry block of the region. ::mlir::Block *getAllocaBlock(::mlir::Region & region) { return ®ion.front(); } }; } // namespace mlir::accomp::detail namespace mlir::accomp { template ::mlir::Block *detail::RecipeInterfaceInterfaceTraits::Model::getAllocaBlock(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Region & region) { return (llvm::cast(tablegen_opaque_val)).getAllocaBlock(region); } template ::mlir::Block *detail::RecipeInterfaceInterfaceTraits::FallbackModel::getAllocaBlock(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Region & region) { return static_cast(impl)->getAllocaBlock(tablegen_opaque_val, region); } template ::mlir::Block *detail::RecipeInterfaceInterfaceTraits::ExternalModel::getAllocaBlock(::mlir::Operation *tablegen_opaque_val, ::mlir::Region ®ion) const { return ®ion.front(); } } // namespace mlir::accomp