[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed May 29 09:06:56 PDT 2024


================
@@ -375,32 +465,35 @@ class TargetDataLayoutInterface : public DataLayoutDialectInterface {
 };
 } // namespace
 
-void DLTIDialect::initialize() {
-  addAttributes<DataLayoutEntryAttr, DataLayoutSpecAttr>();
-  addInterfaces<TargetDataLayoutInterface>();
-}
-
-Attribute DLTIDialect::parseAttribute(DialectAsmParser &parser,
-                                      Type type) const {
-  StringRef attrKind;
-  if (parser.parseKeyword(&attrKind))
-    return {};
+namespace {
+class SystemDescSpecInterface : public DataLayoutDialectInterface {
----------------
ftynse wrote:

Document this please.

IIUC, this interface is only meant to run the verifier. This is rather unconventional as one typically wants to have access to the interface. Have you considered other approaches to trigger verification?

https://github.com/llvm/llvm-project/pull/92138


More information about the Mlir-commits mailing list