[all-commits] [llvm/llvm-project] d102e9: [mlir][MLProgram][NFC] Migrate to OpAsmAttrInterfa...

Hongren Zheng via All-commits all-commits at lists.llvm.org
Mon May 12 02:22:05 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d102e90de5d1fd0ea1e0395d64d4be7af88669c7
      https://github.com/llvm/llvm-project/commit/d102e90de5d1fd0ea1e0395d64d4be7af88669c7
  Author: Hongren Zheng <i at zenithal.me>
  Date:   2025-05-12 (Mon, 12 May 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td
    M mlir/lib/Dialect/MLProgram/IR/MLProgramDialect.cpp

  Log Message:
  -----------
  [mlir][MLProgram][NFC] Migrate to OpAsmAttrInterface for ASM alias generation (#130481)

After the introduction of `OpAsmAttrInterface`, it is favorable to
migrate code using `OpAsmDialectInterface` for ASM alias generation,
which lives in `Dialect.cpp`, to use `OpAsmAttrInterface`, which lives
in `Attrs.td`. In this way, attribute behavior is placed near its
tablegen definition and people won't need to go through other files to
know what other (unexpected) hooks comes into play.

See #124721 for the interface itself and #128191 and #130479 for prior
migrations.

Note that `MLProgramOpAsmInterface` has no content now. However, if we
delete it, a failure related to dialect resource handling will occur

```
within split at llvm-project/mlir/test/IR/invalid-file-metadata.mlir:60 offset :7:7: error: unexpected error: unexpected 'resource' section for dialect 'ml_program'
```

To support resource such interface must be registered.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list