[llvm] RuntimeLibcalls: Pass in ABI name from MCOptions (PR #144894)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 18:03:49 PDT 2025
arsenm wrote:
> I'd like to see how this will actually be used. Do you have a branch you can point to? Or at least some example functions that you're going to be conditionalizing?
This is for all of these isAAPCS_ABI checks [here](https://github.com/llvm/llvm-project/blob/fa7646008ef32b38357189ed5752e1a1b8d6d146/llvm/lib/Target/ARM/ARMISelLowering.cpp#L593) and [here](https://github.com/llvm/llvm-project/blob/fa7646008ef32b38357189ed5752e1a1b8d6d146/llvm/lib/Target/ARM/ARMISelLowering.cpp#L717).
I guess this corresponds to using the "-target-abi" cl::opt, which unfortunately it does seem clang sets. This fall into the category of global state not captured in the IR that either shouldn't exist, should be directly in the triple, or be a module flag in the IR. It would be good if it's possible to just delete this and only derive this from the existing triples.
The existence of [computeDefaultTargetABI](
https://github.com/llvm/llvm-project/blob/5cbed34404a3862c2d7f18e4b4b24f5ce1516a8d/llvm/lib/Target/ARM/ARMTargetMachine.cpp#L130) suggests it might be possible to drop the cl::opt if it's only really needed in tests.
I also think [this case](https://github.com/llvm/llvm-project/blob/fa7646008ef32b38357189ed5752e1a1b8d6d146/llvm/lib/Target/ARM/ARMTargetMachine.h#L81) was a pain but I don't see why now.
https://github.com/llvm/llvm-project/pull/144894
More information about the llvm-commits
mailing list