[llvm] [GISel][RISCV]Implement indirect parameter passing for large scalars (PR #95429)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 02:32:44 PDT 2024
================
@@ -790,6 +804,36 @@ bool CallLowering::handleAssignments(ValueHandler &Handler,
CCValAssign &VA = ArgLocs[j + Idx];
const ISD::ArgFlagsTy Flags = Args[i].Flags[Part];
+ // We found an indirect parameter passing and we are at the first part of
+ // the value being passed. In this case copy the incoming pointer into a
+ // virtual register so later we can load it.
+ if (VA.getLocInfo() == CCValAssign::Indirect && Flags.isSplit()) {
----------------
s-barannikov wrote:
In p4 we can decide that one register is enough, in which case isSplit will be false.
This is probably not applicable to RISC-V, but this is a generic code and should support such scenario.
If this is not going to be supported in this patch, I'd expect a fatal error if isSplit is false when Indirect is set.
https://github.com/llvm/llvm-project/pull/95429
More information about the llvm-commits
mailing list