[Mlir-commits] [mlir] [mlir][ODS] Add namespace filtering to `-gen-enum-*` (PR #89627)

Markus Böck llvmlistbot at llvm.org
Wed Apr 24 01:55:53 PDT 2024


zero9178 wrote:

> > I don't mind changing the description. At least upstream it hasn't been that big of an issue as most upstream dialects don't include the TD files of another dialect. Defining enums in anything but a dedicated *Enums.td is sadly not uncommon however (git grep EnumAttr shows many such places).
> 
> This is the only known pattern that works. 

The precise mechanism how aside for now, do you see this current pattern as being ideal and satisfactory? 
The intention of this PR is that it would no longer be the only pattern that works and we could write enum definitions within the ops, attributes and types TableGen files as well. I see a larger benefit in readability here where a lot of enums can then be placed right next to where they're used in source code. 



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


More information about the Mlir-commits mailing list