[Mlir-commits] [mlir] [mlir] Enable setting alias on AsmState. (PR #153776)
Mehdi Amini
llvmlistbot at llvm.org
Fri Aug 15 07:48:55 PDT 2025
================
@@ -560,6 +560,15 @@ class AsmState {
FallbackAsmResourceMap *map = nullptr);
~AsmState();
+ /// Add an alias for the given attribute. The alias will be used as a
+ /// suggestion when printing. The final alias may be modified to resolve
+ /// conflicts.
+ void addAlias(Attribute attr, StringRef alias);
+
+ /// Add an alias for the given type. The alias will be used as a suggestion
+ /// when printing. The final alias may be modified to resolve conflicts.
+ void addAlias(Type type, StringRef alias);
+
----------------
joker-eph wrote:
I'm also curious about the use-case: you can't know all the possible attributes that will be created by the compiler ahead of time, making this feature quite limited in practice.
Usually one would want to customize a specific kind of attribute, not a particular instance somehow.
https://github.com/llvm/llvm-project/pull/153776
More information about the Mlir-commits
mailing list