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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits