/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// Implementations of this interface generate IR for runtime op verification. /// /// Incorrect op usage can often be caught by op verifiers based on static /// program information. However, in the absence of static program information, /// it can remain undetected at compile time (e.g., in case of dynamic memref /// strides instead of static memref strides). Such cases can be checked at /// runtime. The op-specific checks are generated by this interface. class RuntimeVerifiableOpInterface; } // namespace mlir namespace mlir { /// Implementations of this interface generate IR for runtime op verification. /// /// Incorrect op usage can often be caught by op verifiers based on static /// program information. However, in the absence of static program information, /// it can remain undetected at compile time (e.g., in case of dynamic memref /// strides instead of static memref strides). Such cases can be checked at /// runtime. The op-specific checks are generated by this interface. namespace detail { struct RuntimeVerifiableOpInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. void (*generateRuntimeVerification)(const Concept *impl, ::mlir::Operation *, ::mlir::OpBuilder &, ::mlir::Location, function_ref); }; template class Model : public Concept { public: using Interface = ::mlir::RuntimeVerifiableOpInterface; Model() : Concept{generateRuntimeVerification} {} static inline void generateRuntimeVerification(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::OpBuilder & builder, ::mlir::Location loc, function_ref generateErrorMessage); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::RuntimeVerifiableOpInterface; FallbackModel() : Concept{generateRuntimeVerification} {} static inline void generateRuntimeVerification(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::OpBuilder & builder, ::mlir::Location loc, function_ref generateErrorMessage); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; }; }; template struct RuntimeVerifiableOpInterfaceTrait; } // namespace detail class RuntimeVerifiableOpInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::RuntimeVerifiableOpInterfaceTrait {}; /// Generate IR to verify this op at runtime, aborting runtime execution if /// verification fails. void generateRuntimeVerification(::mlir::OpBuilder & builder, ::mlir::Location loc, function_ref generateErrorMessage); }; } // namespace mlir namespace mlir::detail { template struct RuntimeVerifiableOpInterfaceTrait : public ::mlir::OpInterface::Trait { }; } // namespace mlir::detail namespace mlir { template void detail::RuntimeVerifiableOpInterfaceInterfaceTraits::Model::generateRuntimeVerification(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::OpBuilder & builder, ::mlir::Location loc, function_ref generateErrorMessage) { return (llvm::cast(tablegen_opaque_val)).generateRuntimeVerification(builder, loc, generateErrorMessage); } template void detail::RuntimeVerifiableOpInterfaceInterfaceTraits::FallbackModel::generateRuntimeVerification(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::OpBuilder & builder, ::mlir::Location loc, function_ref generateErrorMessage) { return static_cast(impl)->generateRuntimeVerification(tablegen_opaque_val, builder, loc, generateErrorMessage); } } // namespace mlir