[llvm] [GISel][RISCV]Implement indirect parameter passing for large scalars (PR #95429)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 13:05:02 PDT 2024
s-barannikov wrote:
>> Why don't just do the lowering in the frontend? I.e. return getNaturalAlignIndirect(...) if argument's size exceeds 2xXLEN
> The IR has its own ABI, independent of whatever any particular frontend does. You still should handle any IR function signature regardless of what clang does
I wrote this assuming that lowering of large integer types is intentionally left to the backend, which doesn't appear so.
If the front end does the lowering, then i128 can only appear on functions if the IR was created by other means (such as middle end optimizations or by an external tool), in which case _language_ ABI rules do not necessarily apply and i128 could as well be passed in registers.
Supporting `Indirect` flag in GlobalISel is not a bad thing and may be desired by other targets that prefer leaving some lowering to the backend. I just don't see much value in it for RISC-V.
https://github.com/llvm/llvm-project/pull/95429
More information about the llvm-commits
mailing list