[Mlir-commits] [mlir] [mlir] NamedAttribute utility generator (PR #75118)
Mehdi Amini
llvmlistbot at llvm.org
Tue Dec 12 13:35:26 PST 2023
joker-eph wrote:
This is an interesting problem to solve, and there are a few aspects to it:
1) In terms of performance, we'd want to use StringAttr as much as possible to avoid string hashing and string comparisons everywhere.
2) In terms of correctness, there is the question of inherent vs discardable attributes. However this is an individual property of each operation, and the way you try to "infer" this does not seem right to me: if I have a dialect `NamedAttribute` that I intend to be `mydialect.foo`, I shouldn't lookup the inherent attribute of an operation to see if `foo` is a valid key before preprinting the `mydialect.` prefix: they are two different things!
https://github.com/llvm/llvm-project/pull/75118
More information about the Mlir-commits
mailing list