[Mlir-commits] [mlir] [MLIR][LLVM] Support dso_local_equivalent constants (PR #132131)
Tobias Gysi
llvmlistbot at llvm.org
Fri Mar 21 12:59:23 PDT 2025
================
@@ -1213,6 +1213,17 @@ def LLVM_UndefAttr : LLVM_Attr<"Undef", "undef">;
/// Folded into from LLVM::PoisonOp.
def LLVM_PoisonAttr : LLVM_Attr<"Poison", "poison">;
+//===----------------------------------------------------------------------===//
+// DSOLocalEquivalentAttr
+//===----------------------------------------------------------------------===//
+
+/// Folded into from LLVM::DSOLocalEquivalentOp.
+def LLVM_DSOLocalEquivalentAttr : LLVM_Attr<"DSOLocalEquivalent",
+ "dso_local_equivalent"> {
+ let parameters = (ins "StringAttr":$name);
----------------
gysit wrote:
Yeah I think this is because the op uses FlatSymbolRefAttr. The DSOLocalEquivalentAttr is only used for materialization which is ok. I would have expected that we use the same attribute for the operation and the materialization but the UndefOp for example does not have an attribute at all and just used the UndefAttr for materialization. So in that sense there is precedence for using attributes just for materialization.
https://github.com/llvm/llvm-project/pull/132131
More information about the Mlir-commits
mailing list