[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 09:35:04 PDT 2024


rjmccall wrote:

Is this a target-independent decision?  I could certainly imagine a target with a generic AS wanting to specify that indirect return addresses (and maybe even parameters?) should be in that rather than the alloca AS; among other things, it would allow return values to be used to initialize objects in arbitrary memory.  In C and C-derived languages, maybe that just avoids a memcpy, but in C++ it avoids a potentially non-trivial move.

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


More information about the cfe-commits mailing list