[Mlir-commits] [mlir] [mlir][LLVMIR] Add IFuncOp to LLVM dialect (PR #147697)
Robert Konicar
llvmlistbot at llvm.org
Wed Jul 16 06:25:09 PDT 2025
Jezurko wrote:
For some reason I can't respond to that one specific comment, so I'll do it here.
> I would either just handle the trivial cases where the AliasOp returns a value that is directly defined by an AddressOfOp or we bail out in this case and just return success (which is what you implemented). Did you see real-world examples where there was a lot of code in an AddressOfOp?
Ok, I will implement the handling of values directly defined by the AddressOfOp. I did not see many examples, I am mainly aware of it from the context of this PR (looking through the llvm code) and from looking into the examples for the AliasOp.
> Btw can an IFunc refer to another IFunc as well (I would hope not but one never knows)?
Hm, I just tested it - clang straight up refuses the code, and so does manually written llvm; gcc does accept it, but it doesn't seem to work properly (if I didn't make any mistake while writing the indirections; if curious, see here: https://godbolt.org/z/q1q9YG83v ). So I think the answer is no?
Unfortunately the GNU specification is a bit vague about the properties of the resolver function (https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Function-Attributes.html).
https://github.com/llvm/llvm-project/pull/147697
More information about the Mlir-commits
mailing list