Files
gps/tools/local/circt/include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h.inc
T
2026-07-12 11:01:51 +03:00

177 lines
9.3 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Interface Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir::irdl {
/// Interface to get an IRDLConstraintverifier from an operation.
class VerifyConstraintInterface;
} // namespace mlir::irdl
namespace mlir::irdl {
/// Interface to get an IRDLRegionverifier from an operation.
class VerifyRegionInterface;
} // namespace mlir::irdl
namespace mlir::irdl {
/// Interface to get an IRDLConstraintverifier from an operation.
namespace detail {
struct VerifyConstraintInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
std::unique_ptr<::mlir::irdl::Constraint> (*getVerifier)(const Concept *impl, ::mlir::Operation *, ::mlir::ArrayRef<Value>, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const&, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const&);
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::irdl::VerifyConstraintInterface;
Model() : Concept{getVerifier} {}
static inline std::unique_ptr<::mlir::irdl::Constraint> getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::irdl::VerifyConstraintInterface;
FallbackModel() : Concept{getVerifier} {}
static inline std::unique_ptr<::mlir::irdl::Constraint> getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
};
};
template <typename ConcreteOp>
struct VerifyConstraintInterfaceTrait;
} // namespace detail
class VerifyConstraintInterface : public ::mlir::OpInterface<VerifyConstraintInterface, detail::VerifyConstraintInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<VerifyConstraintInterface, detail::VerifyConstraintInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::VerifyConstraintInterfaceTrait<ConcreteOp> {};
/// Get an instance of a constraint verifier for the associated operation."
/// Returns `nullptr` upon failure.
std::unique_ptr<::mlir::irdl::Constraint> getVerifier(::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
} // namespace mlir::irdl
namespace mlir::irdl {
/// Interface to get an IRDLRegionverifier from an operation.
namespace detail {
struct VerifyRegionInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
std::unique_ptr<::mlir::irdl::RegionConstraint> (*getVerifier)(const Concept *impl, ::mlir::Operation *, ::mlir::ArrayRef<Value>, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const&, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const&);
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::irdl::VerifyRegionInterface;
Model() : Concept{getVerifier} {}
static inline std::unique_ptr<::mlir::irdl::RegionConstraint> getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::irdl::VerifyRegionInterface;
FallbackModel() : Concept{getVerifier} {}
static inline std::unique_ptr<::mlir::irdl::RegionConstraint> getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
};
};
template <typename ConcreteOp>
struct VerifyRegionInterfaceTrait;
} // namespace detail
class VerifyRegionInterface : public ::mlir::OpInterface<VerifyRegionInterface, detail::VerifyRegionInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<VerifyRegionInterface, detail::VerifyRegionInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::VerifyRegionInterfaceTrait<ConcreteOp> {};
/// Get an instance of a constraint verifier for the associated operation."
/// Returns `nullptr` upon failure.
std::unique_ptr<::mlir::irdl::RegionConstraint> getVerifier(::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs);
};
} // namespace mlir::irdl
namespace mlir::irdl::detail {
template <typename ConcreteOp>
struct VerifyConstraintInterfaceTrait : public ::mlir::OpInterface<VerifyConstraintInterface, detail::VerifyConstraintInterfaceInterfaceTraits>::Trait<ConcreteOp> {
};
} // namespace mlir::irdl::detail
namespace mlir::irdl::detail {
template <typename ConcreteOp>
struct VerifyRegionInterfaceTrait : public ::mlir::OpInterface<VerifyRegionInterface, detail::VerifyRegionInterfaceInterfaceTraits>::Trait<ConcreteOp> {
};
} // namespace mlir::irdl::detail
namespace mlir::irdl {
template<typename ConcreteOp>
std::unique_ptr<::mlir::irdl::Constraint> detail::VerifyConstraintInterfaceInterfaceTraits::Model<ConcreteOp>::getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVerifier(valueToConstr, types, attrs);
}
template<typename ConcreteOp>
std::unique_ptr<::mlir::irdl::Constraint> detail::VerifyConstraintInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs) {
return static_cast<const ConcreteOp *>(impl)->getVerifier(tablegen_opaque_val, valueToConstr, types, attrs);
}
} // namespace mlir::irdl
namespace mlir::irdl {
template<typename ConcreteOp>
std::unique_ptr<::mlir::irdl::RegionConstraint> detail::VerifyRegionInterfaceInterfaceTraits::Model<ConcreteOp>::getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVerifier(valueToConstr, types, attrs);
}
template<typename ConcreteOp>
std::unique_ptr<::mlir::irdl::RegionConstraint> detail::VerifyRegionInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVerifier(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::ArrayRef<Value> valueToConstr, ::mlir::DenseMap<::mlir::irdl::TypeOp,
std::unique_ptr<::mlir::DynamicTypeDefinition>> const& types, ::mlir::DenseMap<::mlir::irdl::AttributeOp,
std::unique_ptr<::mlir::DynamicAttrDefinition>> const& attrs) {
return static_cast<const ConcreteOp *>(impl)->getVerifier(tablegen_opaque_val, valueToConstr, types, attrs);
}
} // namespace mlir::irdl