[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 17:03:15 PDT 2023
efriedma-quic wrote:
byval generally results in worse code. It has two problems:
- The copy is invisible. Having the copy explicitly visible means we can optimize the code involved in the copy (sometimes we can eliminate it, or parts of it).
- Gluing the allocation to the call means stack layout is less flexible: the memory has to be allocated at a specific location on the stack.
x86-64 uses it because it was the simplest way to implement the ABI requirements; llvm.call.preallocated.setup theoretically solves the same problem, but it's a lot more complicated.
https://github.com/llvm/llvm-project/pull/66404
More information about the cfe-commits
mailing list