[Mlir-commits] [mlir] [MLIR][LLVM] Support dso_local_equivalent constants (PR #132131)

Tobias Gysi llvmlistbot at llvm.org
Thu Mar 20 13:24:07 PDT 2025


gysit wrote:

> Can you elaborate a bit? Not sure I understand what you mean.

I did read up a bit more what this dso_local_equivalent means. I do not claim I fully understand it but it is essentially a symbol reference that maybe replaced by some other value at runtime (in a dynamic linking scenario). That means it is not computable in IR and indeed needs to be represented in some way.

> If we go this way, I'm curious if should we do the same in the future for no_cfi? How about ptrauth and blockaddress (they are slightly different but still somewhat similat)?

- no_cfi I guess an op makes sense as well (and probably yet another attribute)
- ptrauth seems to have an intrinsic representation. Maybe the intrinsic can be used in MLIR?
- blockaddress that sounds challenging...

I think for the current problem I would probably keep the op you introduced (passes that consume addressof likely would not work with a dso_local_equivalent symbol anyways) and add some special attribute to make materialization work.




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


More information about the Mlir-commits mailing list