[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 15 14:35:02 PDT 2023
efriedma-quic wrote:
> Both s390x and x86_64 ABIs require passing large structs via a pointer
Wrong. x86_64 passes structs by value (copying the data into the argument list). It just looks like a pointer in the IR because LLVM can't really handle large values in registers.
---
The semantics of byval are "the call instruction allocates memory, and copies the argument into that memory". That generally means copying the memory into the argument list, although LangRef doesn't actually mandate that.
If byval were actually implemented correctly for SystemZ, adding would completely change the generated code in a way that's not actually compatible with the SystemZ C ABI.
https://github.com/llvm/llvm-project/pull/66404
More information about the cfe-commits
mailing list