[Mlir-commits] [mlir] [mlir] Add the ability to override attribute parsing/printing in attr-dicts (PR #103304)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 14 14:40:34 PDT 2024


joker-eph wrote:

> This PR adds the easy way to implement this in custom C++ assembly

I don't think this PR is needed to implement it in custom C++: you can print `{` then iterate the dictionary and custom print anything there.

> I'm not sure I follow on the second point.

Second point was that instead of having to do `let hasCustomAssemblyFormat = 1;`, one may want to continue using declarative assembly with `custom` directive just for the `attr-dict` : `  let assemblyFormat = "custom<MyPrintParse>(attr-dict)"`.

> I did propose moving the attribute out of the attr-dict, but people seemed generally against a change of syntax.

This is something that we should just consider deprecated: this will really happen, I just have been slacking on this.

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


More information about the Mlir-commits mailing list