[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
Wed Oct 30 10:00:21 PDT 2024


rjmccall wrote:

I agree that it doesn't meaningfully come from a source-level type and should be specified by the target lowering.  I just want to make sure we write the new code in a way that plausibly supports the target ABI specifying something other than "it's always in the alloca AS".  Can we put the required AS in the `ABIInfo` for the result/parameter and then just make a best effort to perform AS conversions in all the places necessary?  (It'd be a requirement that the alloca AS can be promoted into that AS, of course.) And then, of course, if we miss a few then some target will have some bugs to fix, but we'll at least have tried.

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


More information about the cfe-commits mailing list