[PATCH] D74977: [RISCV][GlobalISel] Add lowerFormalArguments for calling convention
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 09:44:39 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/args.ll:257
+ ret void
+}
----------------
nitinjohnraj wrote:
> arsenm wrote:
> > Probably should have some byval, sret, and cases where the argument list runs out of registers. Same for return values / hidden sret
> > Probably should have some byval, sret,
> Correct me if I'm wrong, but byval and sret both require support for aggregate types, which this patch doesn't support.
>
> > sret, and cases where the argument list runs out of registers.
> Do you have an example of a similar test? I wasn't aware that we could run out of registers at this phase, I thought that we could have an unlimited number of virtual registers.
This is wrong. sret and byval do not really have anything to do with aggregate types, and apply to pointers. You see them on a pointer argument, not aggregate. They would typically be used with an aggregate in memory type, but the in-memory type can be anything
You're mapping to an ABI constraint. If you had 4 32-bit registers for argument passing, you would run out of argument passing registers and have one stack passed argument for (i32, i32, i32, i32, i32).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74977/new/
https://reviews.llvm.org/D74977
More information about the llvm-commits
mailing list