[Mlir-commits] [mlir] [mlir] Enable setting alias on AsmState. (PR #153776)

Jacques Pienaar llvmlistbot at llvm.org
Mon Aug 18 01:53:24 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.
----------------
jpienaar wrote:

I wasn't sure if we want a contract on ordering vs it being a hint, so left it unspecified. Currently this will override - but it is in order of which alias was first specified (e.g, two addAlias calls for same Attribute will result in the first being used). Which corresponds to the user/application being able to dictate alias first and then goes down the regular alias path.

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


More information about the Mlir-commits mailing list