[Mlir-commits] [mlir] [mlir] Enable setting alias on AsmState. (PR #153776)
Mehdi Amini
llvmlistbot at llvm.org
Mon Aug 18 04:31:44 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 can see where this is coming from. One annoying thing I can already see is that none of the tooling would round-trip this, there is no way to configure a tool properly for this, and even when you have an application that wants to set this kind of things. The fact that it is an API on the AsmState makes it so that it wouldn't compose with a lot of things (if you interact with other components, the AsmState is not something in general part of the API boundaries)
https://github.com/llvm/llvm-project/pull/153776
More information about the Mlir-commits
mailing list