/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// Interface for operations to describe the abstract semantics of /// their regions. Currently, two kinds of regions are /// supported. RegionKind::Graph represents a graph region without /// control flow semantics. RegionKind::SSACFG represents an /// [SSA-style control flow](../LangRef.md/#modeling-control-flow) region /// with basic blocks, sequential semantics, and reachability. class RegionKindInterface; } // namespace mlir namespace mlir { /// Interface for operations to describe the abstract semantics of /// their regions. Currently, two kinds of regions are /// supported. RegionKind::Graph represents a graph region without /// control flow semantics. RegionKind::SSACFG represents an /// [SSA-style control flow](../LangRef.md/#modeling-control-flow) region /// with basic blocks, sequential semantics, and reachability. namespace detail { struct RegionKindInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::RegionKind (*getRegionKind)(unsigned); bool (*hasSSADominance)(unsigned); }; template class Model : public Concept { public: using Interface = ::mlir::RegionKindInterface; Model() : Concept{getRegionKind, hasSSADominance} {} static inline ::mlir::RegionKind getRegionKind(unsigned index); static inline bool hasSSADominance(unsigned index); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::RegionKindInterface; FallbackModel() : Concept{getRegionKind, hasSSADominance} {} static inline ::mlir::RegionKind getRegionKind(unsigned index); static inline bool hasSSADominance(unsigned index); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; }; }; template struct RegionKindInterfaceTrait; } // namespace detail class RegionKindInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::RegionKindInterfaceTrait {}; /// Return the kind of the region with the given index inside this operation. ::mlir::RegionKind getRegionKind(unsigned index); /// Return true if the kind of the given region requires the SSA-Dominance property bool hasSSADominance(unsigned index); }; } // namespace mlir namespace mlir::detail { template struct RegionKindInterfaceTrait : public ::mlir::OpInterface::Trait { }; } // namespace mlir::detail namespace mlir { template ::mlir::RegionKind detail::RegionKindInterfaceInterfaceTraits::Model::getRegionKind(unsigned index) { return ConcreteOp::getRegionKind(index); } template bool detail::RegionKindInterfaceInterfaceTraits::Model::hasSSADominance(unsigned index) { return getRegionKind(index) == ::mlir::RegionKind::SSACFG; } template ::mlir::RegionKind detail::RegionKindInterfaceInterfaceTraits::FallbackModel::getRegionKind(unsigned index) { return ConcreteOp::getRegionKind(index); } template bool detail::RegionKindInterfaceInterfaceTraits::FallbackModel::hasSSADominance(unsigned index) { return ConcreteOp::hasSSADominance(index); } } // namespace mlir