[llvm] [ABI] Thread alloca address space through getNaturalAlignIndirect (PR #225301)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 00:00:26 PDT 2026
================
@@ -80,21 +80,22 @@ class TargetInfo {
/// store a derived object and return that as an ABICompatInfo reference.
virtual const ABICompatInfo &getABICompatInfo() const = 0;
+ /// Address space in which indirect arguments are allocated (the target's
+ /// alloca/stack space).
+ virtual unsigned getAllocaAddrSpace() const { return 0; }
+
protected:
LLVM_ABI RecordArgABI getRecordArgABI(const RecordType *RT) const;
LLVM_ABI RecordArgABI getRecordArgABI(const Type *Ty) const;
LLVM_ABI bool isPromotableInteger(const IntegerType *IT) const;
- LLVM_ABI ArgInfo getNaturalAlignIndirect(const Type *Ty,
+ LLVM_ABI ArgInfo getNaturalAlignIndirect(const Type *Ty, unsigned AddrSpace,
----------------
skc7 wrote:
Thanks @andykaylor for feedback.
For now I'd like to keep AddrSpace as an explicit parameter to mirror classic's `ABIInfo::getNaturalAlignIndirect`. Happy to internalize it as a follow-up if we decide to simplify later.
https://github.com/llvm/llvm-project/pull/225301
More information about the llvm-commits
mailing list