/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// Attribute interface exposing querying-mechanism for key-value associations. /// /// The central feature of DLTI attributes is to allow looking up values at /// keys. This interface represent the core functionality to do so - as such /// most DLTI attributes should be implementing this interface. /// /// Note that as the `query` method returns an attribute, this attribute can /// be recursively queried when it also implements this interface. class DLTIQueryInterface; } // namespace mlir namespace mlir { /// Attribute interface describing an entry in a data layout specification. /// /// A data layout specification entry is a key-value pair. Its key is either a /// type, when the entry is related to a type or a class of types, or an /// identifier, when it is not. `DataLayoutEntryKey` is an alias allowing one /// to use both key types. Its value is an arbitrary attribute that is /// interpreted either by the type for type keys or by the dialect containing /// the identifier for identifier keys. The interface provides a hook that /// can be used by specific implementations to delegate the verification of /// attribute fitness for a particular key to the relevant type or dialect. class DataLayoutEntryInterface; } // namespace mlir namespace mlir { /// Attribute interface describing a data layout specification. /// /// A data layout specification is seen as a sequence of entries, each of which /// is an attribute implementing the data layout entry interface. It assumes /// a contiguous underlying storage for entries. The interface provides a hook /// for implementations to verify the well-formedness of the specification, /// with a default implementation that verifies the absence of entries with /// duplicate keys and the well-formedness of each individual entry before /// dispatching to the type or dialect the entry is associated with. /// /// Data layout specifications may need to be combined in case they appear on /// nested operations subject to layout, or to ensure the validity of layout /// modification. Concrete specification attributes must implement the /// corresponding hook. class DataLayoutSpecInterface; } // namespace mlir namespace mlir { /// Attribute interface describing a target device description specification. /// /// A target device description specification is a list of device properties (key) /// and their values for a specific device. The device is identified using "device_id" /// (as a key and ui32 value) and "device_type" key which must have a string value. /// Both "device_id" and "device_type" are mandatory keys. As an example, L1 cache /// size could be a device property, and its value would be a device specific size. /// /// A target device description specification is attached to a module as a module level /// attribute. class TargetDeviceSpecInterface; } // namespace mlir namespace mlir { /// Attribute interface describing a target system description specification. /// /// A target system description specification is a list of target device /// specifications, with one device specification for a device in the system. As /// such, a target system description specification allows specifying a heterogenous /// system, with devices of different types (e.g., CPU, GPU, etc.) /// /// The only requirement on a valid target system description specification is that /// the "device_id" in every target device description specification needs to be /// unique. This is because, ultimately, this "device_id" is used by the user to /// query a value of a device property. class TargetSystemSpecInterface; } // namespace mlir namespace mlir { /// Attribute interface exposing querying-mechanism for key-value associations. /// /// The central feature of DLTI attributes is to allow looking up values at /// keys. This interface represent the core functionality to do so - as such /// most DLTI attributes should be implementing this interface. /// /// Note that as the `query` method returns an attribute, this attribute can /// be recursively queried when it also implements this interface. namespace detail { struct DLTIQueryInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::FailureOr<::mlir::Attribute> (*query)(const Concept *impl, ::mlir::Attribute , ::mlir::DataLayoutEntryKey); }; template class Model : public Concept { public: using Interface = ::mlir::DLTIQueryInterface; Model() : Concept{query} {} static inline ::mlir::FailureOr<::mlir::Attribute> query(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::DataLayoutEntryKey key); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::DLTIQueryInterface; FallbackModel() : Concept{query} {} static inline ::mlir::FailureOr<::mlir::Attribute> query(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::DataLayoutEntryKey key); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; }; }; template struct DLTIQueryInterfaceTrait; } // namespace detail class DLTIQueryInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::DLTIQueryInterfaceTrait {}; /// Returns the attribute associated with the key. ::mlir::FailureOr<::mlir::Attribute> query(::mlir::DataLayoutEntryKey key) const; }; } // namespace mlir namespace mlir { /// Attribute interface describing an entry in a data layout specification. /// /// A data layout specification entry is a key-value pair. Its key is either a /// type, when the entry is related to a type or a class of types, or an /// identifier, when it is not. `DataLayoutEntryKey` is an alias allowing one /// to use both key types. Its value is an arbitrary attribute that is /// interpreted either by the type for type keys or by the dialect containing /// the identifier for identifier keys. The interface provides a hook that /// can be used by specific implementations to delegate the verification of /// attribute fitness for a particular key to the relevant type or dialect. namespace detail { struct DataLayoutEntryInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::DataLayoutEntryKey (*getKey)(const Concept *impl, ::mlir::Attribute ); ::mlir::Attribute (*getValue)(const Concept *impl, ::mlir::Attribute ); ::llvm::LogicalResult (*verifyEntry)(const Concept *impl, ::mlir::Attribute , ::mlir::Location); }; template class Model : public Concept { public: using Interface = ::mlir::DataLayoutEntryInterface; Model() : Concept{getKey, getValue, verifyEntry} {} static inline ::mlir::DataLayoutEntryKey getKey(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::Attribute getValue(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::llvm::LogicalResult verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::DataLayoutEntryInterface; FallbackModel() : Concept{getKey, getValue, verifyEntry} {} static inline ::mlir::DataLayoutEntryKey getKey(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::Attribute getValue(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::llvm::LogicalResult verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; ::llvm::LogicalResult verifyEntry(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const; }; }; template struct DataLayoutEntryInterfaceTrait; } // namespace detail class DataLayoutEntryInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::DataLayoutEntryInterfaceTrait {}; /// Returns the key of the this layout entry. ::mlir::DataLayoutEntryKey getKey() const; /// Returns the value of this layout entry. ::mlir::Attribute getValue() const; /// Checks that the entry is well-formed, reports errors at the provided location. ::llvm::LogicalResult verifyEntry(::mlir::Location loc) const; /// Returns `true` if the key of this entry is a type. bool isTypeEntry() { return llvm::isa<::mlir::Type>(getKey()); } }; } // namespace mlir namespace mlir { /// Attribute interface describing a data layout specification. /// /// A data layout specification is seen as a sequence of entries, each of which /// is an attribute implementing the data layout entry interface. It assumes /// a contiguous underlying storage for entries. The interface provides a hook /// for implementations to verify the well-formedness of the specification, /// with a default implementation that verifies the absence of entries with /// duplicate keys and the well-formedness of each individual entry before /// dispatching to the type or dialect the entry is associated with. /// /// Data layout specifications may need to be combined in case they appear on /// nested operations subject to layout, or to ensure the validity of layout /// modification. Concrete specification attributes must implement the /// corresponding hook. namespace detail { struct DataLayoutSpecInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::DataLayoutSpecInterface (*combineWith)(const Concept *impl, ::mlir::Attribute , ::llvm::ArrayRef<::mlir::DataLayoutSpecInterface>); ::mlir::DataLayoutEntryListRef (*getEntries)(const Concept *impl, ::mlir::Attribute ); ::mlir::StringAttr (*getEndiannessIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getDefaultMemorySpaceIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getAllocaMemorySpaceIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getProgramMemorySpaceIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getGlobalMemorySpaceIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getManglingModeIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getStackAlignmentIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getFunctionPointerAlignmentIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::StringAttr (*getLegalIntWidthsIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::MLIRContext *); ::mlir::DataLayoutEntryList (*getSpecForType)(const Concept *impl, ::mlir::Attribute , ::mlir::TypeID); ::mlir::DataLayoutEntryInterface (*getSpecForIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::StringAttr); ::llvm::LogicalResult (*verifySpec)(const Concept *impl, ::mlir::Attribute , ::mlir::Location); /// The base classes of this interface. const ::mlir::DLTIQueryInterface::Concept *implDLTIQueryInterface = nullptr; void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap) { implDLTIQueryInterface = interfaceMap.lookup<::mlir::DLTIQueryInterface>(); assert(implDLTIQueryInterface && "`::mlir::DataLayoutSpecInterface` expected its base interface `::mlir::DLTIQueryInterface` to be registered"); } }; template class Model : public Concept { public: using Interface = ::mlir::DataLayoutSpecInterface; Model() : Concept{combineWith, getEntries, getEndiannessIdentifier, getDefaultMemorySpaceIdentifier, getAllocaMemorySpaceIdentifier, getProgramMemorySpaceIdentifier, getGlobalMemorySpaceIdentifier, getManglingModeIdentifier, getStackAlignmentIdentifier, getFunctionPointerAlignmentIdentifier, getLegalIntWidthsIdentifier, getSpecForType, getSpecForIdentifier, verifySpec} {} static inline ::mlir::DataLayoutSpecInterface combineWith(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::llvm::ArrayRef<::mlir::DataLayoutSpecInterface> specs); static inline ::mlir::DataLayoutEntryListRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::StringAttr getEndiannessIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getDefaultMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getAllocaMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getProgramMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getGlobalMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getManglingModeIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getStackAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getFunctionPointerAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getLegalIntWidthsIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::DataLayoutEntryList getSpecForType(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type); static inline ::mlir::DataLayoutEntryInterface getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier); static inline ::llvm::LogicalResult verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::DataLayoutSpecInterface; FallbackModel() : Concept{combineWith, getEntries, getEndiannessIdentifier, getDefaultMemorySpaceIdentifier, getAllocaMemorySpaceIdentifier, getProgramMemorySpaceIdentifier, getGlobalMemorySpaceIdentifier, getManglingModeIdentifier, getStackAlignmentIdentifier, getFunctionPointerAlignmentIdentifier, getLegalIntWidthsIdentifier, getSpecForType, getSpecForIdentifier, verifySpec} {} static inline ::mlir::DataLayoutSpecInterface combineWith(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::llvm::ArrayRef<::mlir::DataLayoutSpecInterface> specs); static inline ::mlir::DataLayoutEntryListRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::StringAttr getEndiannessIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getDefaultMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getAllocaMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getProgramMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getGlobalMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getManglingModeIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getStackAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getFunctionPointerAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::StringAttr getLegalIntWidthsIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context); static inline ::mlir::DataLayoutEntryList getSpecForType(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type); static inline ::mlir::DataLayoutEntryInterface getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier); static inline ::llvm::LogicalResult verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; ::mlir::DataLayoutEntryList getSpecForType(::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type) const; ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) const; ::llvm::LogicalResult verifySpec(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const; }; }; template struct DataLayoutSpecInterfaceTrait; } // namespace detail class DataLayoutSpecInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::DataLayoutSpecInterfaceTrait {}; /// Combines the current layout with the given list of layouts, provided from the outermost (oldest) to the innermost (newest). Returns null on failure. ::mlir::DataLayoutSpecInterface combineWith(::llvm::ArrayRef<::mlir::DataLayoutSpecInterface> specs) const; /// Returns the list of layout entries. ::mlir::DataLayoutEntryListRef getEntries() const; /// Returns the endianness identifier. ::mlir::StringAttr getEndiannessIdentifier(::mlir::MLIRContext * context) const; /// Returns the default memory space identifier. ::mlir::StringAttr getDefaultMemorySpaceIdentifier(::mlir::MLIRContext * context) const; /// Returns the alloca memory space identifier. ::mlir::StringAttr getAllocaMemorySpaceIdentifier(::mlir::MLIRContext * context) const; /// Returns the program memory space identifier. ::mlir::StringAttr getProgramMemorySpaceIdentifier(::mlir::MLIRContext * context) const; /// Returns the global memory space identifier. ::mlir::StringAttr getGlobalMemorySpaceIdentifier(::mlir::MLIRContext * context) const; /// Returns the mangling mode identifier. ::mlir::StringAttr getManglingModeIdentifier(::mlir::MLIRContext * context) const; /// Returns the stack alignment identifier. ::mlir::StringAttr getStackAlignmentIdentifier(::mlir::MLIRContext * context) const; /// Returns the function pointer alignment identifier. ::mlir::StringAttr getFunctionPointerAlignmentIdentifier(::mlir::MLIRContext * context) const; /// Returns the legal int widths identifier. ::mlir::StringAttr getLegalIntWidthsIdentifier(::mlir::MLIRContext * context) const; /// Returns a copy of the entries related to a specific type class regardles of type parameters. ::mlir::DataLayoutEntryList getSpecForType(::mlir::TypeID type) const; /// Returns the entry related to the given identifier, if present. ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::StringAttr identifier) const; /// Verifies the validity of the specification and reports any errors at the given location. ::llvm::LogicalResult verifySpec(::mlir::Location loc) const; /// Returns a copy of the entries related to the type specified as template /// parameter. template DataLayoutEntryList getSpecForType() { return getSpecForType(TypeID::get()); } /// Helper for default implementation of `DLTIQueryInterface`'s `query`. inline ::mlir::FailureOr<::mlir::Attribute> queryHelper(::mlir::DataLayoutEntryKey key) const { for (DataLayoutEntryInterface entry : getEntries()) if (entry.getKey() == key) return entry.getValue(); return ::mlir::failure(); } /// Populates the given maps with lists of entries grouped by the type or /// identifier they are associated with. Users are not expected to call this /// method directly. void bucketEntriesByType( ::llvm::MapVector<::mlir::TypeID, ::mlir::DataLayoutEntryList> &types, ::llvm::MapVector<::mlir::StringAttr, ::mlir::DataLayoutEntryInterface> &ids); //===----------------------------------------------------------------===// // Inherited from ::mlir::DLTIQueryInterface //===----------------------------------------------------------------===// operator ::mlir::DLTIQueryInterface () const { if (!*this) return nullptr; return ::mlir::DLTIQueryInterface(*this, getImpl()->implDLTIQueryInterface); } /// Returns the attribute associated with the key. ::mlir::FailureOr<::mlir::Attribute> query(::mlir::DataLayoutEntryKey key) const; }; } // namespace mlir namespace mlir { /// Attribute interface describing a target device description specification. /// /// A target device description specification is a list of device properties (key) /// and their values for a specific device. The device is identified using "device_id" /// (as a key and ui32 value) and "device_type" key which must have a string value. /// Both "device_id" and "device_type" are mandatory keys. As an example, L1 cache /// size could be a device property, and its value would be a device specific size. /// /// A target device description specification is attached to a module as a module level /// attribute. namespace detail { struct TargetDeviceSpecInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::DataLayoutEntryListRef (*getEntries)(const Concept *impl, ::mlir::Attribute ); ::mlir::DataLayoutEntryInterface (*getSpecForIdentifier)(const Concept *impl, ::mlir::Attribute , ::mlir::StringAttr); ::llvm::LogicalResult (*verifyEntry)(const Concept *impl, ::mlir::Attribute , ::mlir::Location); /// The base classes of this interface. const ::mlir::DLTIQueryInterface::Concept *implDLTIQueryInterface = nullptr; void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap) { implDLTIQueryInterface = interfaceMap.lookup<::mlir::DLTIQueryInterface>(); assert(implDLTIQueryInterface && "`::mlir::TargetDeviceSpecInterface` expected its base interface `::mlir::DLTIQueryInterface` to be registered"); } }; template class Model : public Concept { public: using Interface = ::mlir::TargetDeviceSpecInterface; Model() : Concept{getEntries, getSpecForIdentifier, verifyEntry} {} static inline ::mlir::DataLayoutEntryListRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::DataLayoutEntryInterface getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier); static inline ::llvm::LogicalResult verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::TargetDeviceSpecInterface; FallbackModel() : Concept{getEntries, getSpecForIdentifier, verifyEntry} {} static inline ::mlir::DataLayoutEntryListRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline ::mlir::DataLayoutEntryInterface getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier); static inline ::llvm::LogicalResult verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) const; ::llvm::LogicalResult verifyEntry(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const; }; }; template struct TargetDeviceSpecInterfaceTrait; } // namespace detail class TargetDeviceSpecInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::TargetDeviceSpecInterfaceTrait {}; /// Returns the list of layout entries. ::mlir::DataLayoutEntryListRef getEntries() const; /// Returns the entry related to the given identifier, if present. ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::StringAttr identifier) const; /// Checks that the entry is well-formed, reports errors at the provided location. ::llvm::LogicalResult verifyEntry(::mlir::Location loc) const; /// Helper for default implementation of `DLTIQueryInterface`'s `query`. ::mlir::FailureOr<::mlir::Attribute> queryHelper(::mlir::DataLayoutEntryKey key) const { if (auto strKey = ::llvm::dyn_cast(key)) if (DataLayoutEntryInterface spec = getSpecForIdentifier(strKey)) return spec.getValue(); return ::mlir::failure(); } //===----------------------------------------------------------------===// // Inherited from ::mlir::DLTIQueryInterface //===----------------------------------------------------------------===// operator ::mlir::DLTIQueryInterface () const { if (!*this) return nullptr; return ::mlir::DLTIQueryInterface(*this, getImpl()->implDLTIQueryInterface); } /// Returns the attribute associated with the key. ::mlir::FailureOr<::mlir::Attribute> query(::mlir::DataLayoutEntryKey key) const; }; } // namespace mlir namespace mlir { /// Attribute interface describing a target system description specification. /// /// A target system description specification is a list of target device /// specifications, with one device specification for a device in the system. As /// such, a target system description specification allows specifying a heterogenous /// system, with devices of different types (e.g., CPU, GPU, etc.) /// /// The only requirement on a valid target system description specification is that /// the "device_id" in every target device description specification needs to be /// unique. This is because, ultimately, this "device_id" is used by the user to /// query a value of a device property. namespace detail { struct TargetSystemSpecInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::llvm::ArrayRef (*getEntries)(const Concept *impl, ::mlir::Attribute ); std::optional<::mlir::TargetDeviceSpecInterface> (*getDeviceSpecForDeviceID)(const Concept *impl, ::mlir::Attribute , StringAttr); ::llvm::LogicalResult (*verifySpec)(const Concept *impl, ::mlir::Attribute , ::mlir::Location); /// The base classes of this interface. const ::mlir::DLTIQueryInterface::Concept *implDLTIQueryInterface = nullptr; void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap) { implDLTIQueryInterface = interfaceMap.lookup<::mlir::DLTIQueryInterface>(); assert(implDLTIQueryInterface && "`::mlir::TargetSystemSpecInterface` expected its base interface `::mlir::DLTIQueryInterface` to be registered"); } }; template class Model : public Concept { public: using Interface = ::mlir::TargetSystemSpecInterface; Model() : Concept{getEntries, getDeviceSpecForDeviceID, verifySpec} {} static inline ::llvm::ArrayRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline std::optional<::mlir::TargetDeviceSpecInterface> getDeviceSpecForDeviceID(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, StringAttr deviceID); static inline ::llvm::LogicalResult verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::TargetSystemSpecInterface; FallbackModel() : Concept{getEntries, getDeviceSpecForDeviceID, verifySpec} {} static inline ::llvm::ArrayRef getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val); static inline std::optional<::mlir::TargetDeviceSpecInterface> getDeviceSpecForDeviceID(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, StringAttr deviceID); static inline ::llvm::LogicalResult verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; ::llvm::LogicalResult verifySpec(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const; }; }; template struct TargetSystemSpecInterfaceTrait; } // namespace detail class TargetSystemSpecInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::TargetSystemSpecInterfaceTrait {}; /// Returns the list of layout entries. ::llvm::ArrayRef getEntries() const; /// Returns the device description spec for given device ID std::optional<::mlir::TargetDeviceSpecInterface> getDeviceSpecForDeviceID(StringAttr deviceID) const; /// Verifies the validity of the specification and reports any errors at the given location. ::llvm::LogicalResult verifySpec(::mlir::Location loc) const; using DeviceID = StringAttr; /// Helper for default implementation of `DLTIQueryInterface`'s `query`. ::mlir::FailureOr<::mlir::Attribute> queryHelper(::mlir::DataLayoutEntryKey key) const { if (auto strKey = ::llvm::dyn_cast<::mlir::StringAttr>(key)) if (auto deviceSpec = getDeviceSpecForDeviceID(strKey)) return *deviceSpec; return ::mlir::failure(); } //===----------------------------------------------------------------===// // Inherited from ::mlir::DLTIQueryInterface //===----------------------------------------------------------------===// operator ::mlir::DLTIQueryInterface () const { if (!*this) return nullptr; return ::mlir::DLTIQueryInterface(*this, getImpl()->implDLTIQueryInterface); } /// Returns the attribute associated with the key. ::mlir::FailureOr<::mlir::Attribute> query(::mlir::DataLayoutEntryKey key) const; }; } // namespace mlir namespace mlir::detail { template struct DLTIQueryInterfaceTrait : public ::mlir::AttributeInterface::Trait { }; } // namespace mlir::detail namespace mlir::detail { template struct DataLayoutEntryInterfaceTrait : public ::mlir::AttributeInterface::Trait { /// Checks that the entry is well-formed, reports errors at the provided location. ::llvm::LogicalResult verifyEntry(::mlir::Location loc) const { return ::mlir::success(); } }; } // namespace mlir::detail namespace mlir::detail { template struct DataLayoutSpecInterfaceTrait : public ::mlir::AttributeInterface::Trait { /// Returns a copy of the entries related to a specific type class regardles of type parameters. ::mlir::DataLayoutEntryList getSpecForType(::mlir::TypeID type) const { return ::mlir::detail::filterEntriesForType((*static_cast(this)).getEntries(), type); } /// Returns the entry related to the given identifier, if present. ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::StringAttr identifier) const { return ::mlir::detail::filterEntryForIdentifier((*static_cast(this)).getEntries(), identifier); } /// Verifies the validity of the specification and reports any errors at the given location. ::llvm::LogicalResult verifySpec(::mlir::Location loc) const { return ::mlir::detail::verifyDataLayoutSpec((*static_cast(this)), loc); } }; } // namespace mlir::detail namespace mlir::detail { template struct TargetDeviceSpecInterfaceTrait : public ::mlir::AttributeInterface::Trait { /// Returns the entry related to the given identifier, if present. ::mlir::DataLayoutEntryInterface getSpecForIdentifier(::mlir::StringAttr identifier) const { return ::mlir::detail::filterEntryForIdentifier((*static_cast(this)).getEntries(), identifier); } /// Checks that the entry is well-formed, reports errors at the provided location. ::llvm::LogicalResult verifyEntry(::mlir::Location loc) const { return ::mlir::success(); } }; } // namespace mlir::detail namespace mlir::detail { template struct TargetSystemSpecInterfaceTrait : public ::mlir::AttributeInterface::Trait { /// Verifies the validity of the specification and reports any errors at the given location. ::llvm::LogicalResult verifySpec(::mlir::Location loc) const { return ::mlir::detail::verifyTargetSystemSpec((*static_cast(this)), loc); } }; } // namespace mlir::detail namespace mlir { template ::mlir::FailureOr<::mlir::Attribute> detail::DLTIQueryInterfaceInterfaceTraits::Model::query(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::DataLayoutEntryKey key) { return (::llvm::cast(tablegen_opaque_val)).query(key); } template ::mlir::FailureOr<::mlir::Attribute> detail::DLTIQueryInterfaceInterfaceTraits::FallbackModel::query(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::DataLayoutEntryKey key) { return static_cast(impl)->query(tablegen_opaque_val, key); } } // namespace mlir namespace mlir { template ::mlir::DataLayoutEntryKey detail::DataLayoutEntryInterfaceInterfaceTraits::Model::getKey(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return (::llvm::cast(tablegen_opaque_val)).getKey(); } template ::mlir::Attribute detail::DataLayoutEntryInterfaceInterfaceTraits::Model::getValue(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return (::llvm::cast(tablegen_opaque_val)).getValue(); } template ::llvm::LogicalResult detail::DataLayoutEntryInterfaceInterfaceTraits::Model::verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return (::llvm::cast(tablegen_opaque_val)).verifyEntry(loc); } template ::mlir::DataLayoutEntryKey detail::DataLayoutEntryInterfaceInterfaceTraits::FallbackModel::getKey(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return static_cast(impl)->getKey(tablegen_opaque_val); } template ::mlir::Attribute detail::DataLayoutEntryInterfaceInterfaceTraits::FallbackModel::getValue(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return static_cast(impl)->getValue(tablegen_opaque_val); } template ::llvm::LogicalResult detail::DataLayoutEntryInterfaceInterfaceTraits::FallbackModel::verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return static_cast(impl)->verifyEntry(tablegen_opaque_val, loc); } template ::llvm::LogicalResult detail::DataLayoutEntryInterfaceInterfaceTraits::ExternalModel::verifyEntry(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const { return ::mlir::success(); } } // namespace mlir namespace mlir { template ::mlir::DataLayoutSpecInterface detail::DataLayoutSpecInterfaceInterfaceTraits::Model::combineWith(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::llvm::ArrayRef<::mlir::DataLayoutSpecInterface> specs) { return (::llvm::cast(tablegen_opaque_val)).combineWith(specs); } template ::mlir::DataLayoutEntryListRef detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return (::llvm::cast(tablegen_opaque_val)).getEntries(); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getEndiannessIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getEndiannessIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getDefaultMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getDefaultMemorySpaceIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getAllocaMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getAllocaMemorySpaceIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getProgramMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getProgramMemorySpaceIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getGlobalMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getGlobalMemorySpaceIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getManglingModeIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getManglingModeIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getStackAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getStackAlignmentIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getFunctionPointerAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getFunctionPointerAlignmentIdentifier(context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getLegalIntWidthsIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return (::llvm::cast(tablegen_opaque_val)).getLegalIntWidthsIdentifier(context); } template ::mlir::DataLayoutEntryList detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getSpecForType(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type) { return (::llvm::cast(tablegen_opaque_val)).getSpecForType(type); } template ::mlir::DataLayoutEntryInterface detail::DataLayoutSpecInterfaceInterfaceTraits::Model::getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) { return (::llvm::cast(tablegen_opaque_val)).getSpecForIdentifier(identifier); } template ::llvm::LogicalResult detail::DataLayoutSpecInterfaceInterfaceTraits::Model::verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return (::llvm::cast(tablegen_opaque_val)).verifySpec(loc); } template ::mlir::DataLayoutSpecInterface detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::combineWith(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::llvm::ArrayRef<::mlir::DataLayoutSpecInterface> specs) { return static_cast(impl)->combineWith(tablegen_opaque_val, specs); } template ::mlir::DataLayoutEntryListRef detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return static_cast(impl)->getEntries(tablegen_opaque_val); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getEndiannessIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getEndiannessIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getDefaultMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getDefaultMemorySpaceIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getAllocaMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getAllocaMemorySpaceIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getProgramMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getProgramMemorySpaceIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getGlobalMemorySpaceIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getGlobalMemorySpaceIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getManglingModeIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getManglingModeIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getStackAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getStackAlignmentIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getFunctionPointerAlignmentIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getFunctionPointerAlignmentIdentifier(tablegen_opaque_val, context); } template ::mlir::StringAttr detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getLegalIntWidthsIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::MLIRContext * context) { return static_cast(impl)->getLegalIntWidthsIdentifier(tablegen_opaque_val, context); } template ::mlir::DataLayoutEntryList detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getSpecForType(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type) { return static_cast(impl)->getSpecForType(tablegen_opaque_val, type); } template ::mlir::DataLayoutEntryInterface detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) { return static_cast(impl)->getSpecForIdentifier(tablegen_opaque_val, identifier); } template ::llvm::LogicalResult detail::DataLayoutSpecInterfaceInterfaceTraits::FallbackModel::verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return static_cast(impl)->verifySpec(tablegen_opaque_val, loc); } template ::mlir::DataLayoutEntryList detail::DataLayoutSpecInterfaceInterfaceTraits::ExternalModel::getSpecForType(::mlir::Attribute tablegen_opaque_val, ::mlir::TypeID type) const { return ::mlir::detail::filterEntriesForType((::llvm::cast(tablegen_opaque_val)).getEntries(), type); } template ::mlir::DataLayoutEntryInterface detail::DataLayoutSpecInterfaceInterfaceTraits::ExternalModel::getSpecForIdentifier(::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) const { return ::mlir::detail::filterEntryForIdentifier((::llvm::cast(tablegen_opaque_val)).getEntries(), identifier); } template ::llvm::LogicalResult detail::DataLayoutSpecInterfaceInterfaceTraits::ExternalModel::verifySpec(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const { return ::mlir::detail::verifyDataLayoutSpec((::llvm::cast(tablegen_opaque_val)), loc); } } // namespace mlir namespace mlir { template ::mlir::DataLayoutEntryListRef detail::TargetDeviceSpecInterfaceInterfaceTraits::Model::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return (::llvm::cast(tablegen_opaque_val)).getEntries(); } template ::mlir::DataLayoutEntryInterface detail::TargetDeviceSpecInterfaceInterfaceTraits::Model::getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) { return (::llvm::cast(tablegen_opaque_val)).getSpecForIdentifier(identifier); } template ::llvm::LogicalResult detail::TargetDeviceSpecInterfaceInterfaceTraits::Model::verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return (::llvm::cast(tablegen_opaque_val)).verifyEntry(loc); } template ::mlir::DataLayoutEntryListRef detail::TargetDeviceSpecInterfaceInterfaceTraits::FallbackModel::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return static_cast(impl)->getEntries(tablegen_opaque_val); } template ::mlir::DataLayoutEntryInterface detail::TargetDeviceSpecInterfaceInterfaceTraits::FallbackModel::getSpecForIdentifier(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) { return static_cast(impl)->getSpecForIdentifier(tablegen_opaque_val, identifier); } template ::llvm::LogicalResult detail::TargetDeviceSpecInterfaceInterfaceTraits::FallbackModel::verifyEntry(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return static_cast(impl)->verifyEntry(tablegen_opaque_val, loc); } template ::mlir::DataLayoutEntryInterface detail::TargetDeviceSpecInterfaceInterfaceTraits::ExternalModel::getSpecForIdentifier(::mlir::Attribute tablegen_opaque_val, ::mlir::StringAttr identifier) const { return ::mlir::detail::filterEntryForIdentifier((::llvm::cast(tablegen_opaque_val)).getEntries(), identifier); } template ::llvm::LogicalResult detail::TargetDeviceSpecInterfaceInterfaceTraits::ExternalModel::verifyEntry(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const { return ::mlir::success(); } } // namespace mlir namespace mlir { template ::llvm::ArrayRef detail::TargetSystemSpecInterfaceInterfaceTraits::Model::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return (::llvm::cast(tablegen_opaque_val)).getEntries(); } template std::optional<::mlir::TargetDeviceSpecInterface> detail::TargetSystemSpecInterfaceInterfaceTraits::Model::getDeviceSpecForDeviceID(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, StringAttr deviceID) { return (::llvm::cast(tablegen_opaque_val)).getDeviceSpecForDeviceID(deviceID); } template ::llvm::LogicalResult detail::TargetSystemSpecInterfaceInterfaceTraits::Model::verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return (::llvm::cast(tablegen_opaque_val)).verifySpec(loc); } template ::llvm::ArrayRef detail::TargetSystemSpecInterfaceInterfaceTraits::FallbackModel::getEntries(const Concept *impl, ::mlir::Attribute tablegen_opaque_val) { return static_cast(impl)->getEntries(tablegen_opaque_val); } template std::optional<::mlir::TargetDeviceSpecInterface> detail::TargetSystemSpecInterfaceInterfaceTraits::FallbackModel::getDeviceSpecForDeviceID(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, StringAttr deviceID) { return static_cast(impl)->getDeviceSpecForDeviceID(tablegen_opaque_val, deviceID); } template ::llvm::LogicalResult detail::TargetSystemSpecInterfaceInterfaceTraits::FallbackModel::verifySpec(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) { return static_cast(impl)->verifySpec(tablegen_opaque_val, loc); } template ::llvm::LogicalResult detail::TargetSystemSpecInterfaceInterfaceTraits::ExternalModel::verifySpec(::mlir::Attribute tablegen_opaque_val, ::mlir::Location loc) const { return ::mlir::detail::verifyTargetSystemSpec((::llvm::cast(tablegen_opaque_val)), loc); } } // namespace mlir