[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 6 09:13:31 PST 2024
================
@@ -1780,6 +1780,14 @@ class TargetInfo : public TransferrableTargetInfo,
return 0;
}
+ /// \returns Target specific address space for indirect (e.g. sret) arguments.
+ /// If such an address space exists, it must be convertible to and from the
+ /// alloca address space. If it does not, std::nullopt is returned and the
+ /// alloca address space will be used.
+ virtual std::optional<unsigned> getIndirectArgAddressSpace() const {
----------------
arsenm wrote:
This also shouldn't be optional. There always must be a definitive IR address space.
Also I'm not sure I follow why this is still necessary if you've modified getIndirect to carry the address space. RetAI should have this info now?
https://github.com/llvm/llvm-project/pull/114062
More information about the cfe-commits
mailing list