[llvm] [GISel][RISCV]Implement indirect parameter passing for large scalars (PR #95429)

Gábor Spaits via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 05:19:17 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()) {
----------------
spaits wrote:

Then I will implement this too.

So what I would do is the following:
- Move the logic out of the inner loop.
- Do not check, if the 0th part `isSplit`
- But, check it if the indirectly passed parameter is a scalar(?). (I wanted to disable indirect parameter passing for vectors, but I forgot to do that. Or should we do this indirect passing for vector types too?)

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


More information about the llvm-commits mailing list