[llvm-branch-commits] [llvm] [AMDGPU] Allocate and reserve registers for address space 13 objects (PR #214248)
Carl Ritson via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 11 00:52:52 PST 2026
================
@@ -386,6 +420,20 @@ bool AMDGPUPromoteAllocaImpl::run(Function &F, bool PromoteToLDS) {
LLVM_DEBUG(dbgs() << "Analyzing: " << *AI << '\n');
AllocaAnalysis AA{AI};
+
+ // An alloca already in the VGPR address space is not promoted, only
+ // given a place there. Required for functionality, so it runs whether
+ // or not optimizations are enabled.
+ if (AI->getAddressSpace() == AMDGPUAS::VGPR) {
+ if (IsLatePass)
+ Allocas.push_back(std::move(AA));
+ continue;
+ }
----------------
perlfu wrote:
>From my side, you are correct, I don't think assigning registers to addrspace(13) objects is part of `PromoteAlloca` pass. Promoting private alloca to addrspace(13) seems fine in principle. I have not yet reviewed #215282.
https://github.com/llvm/llvm-project/pull/214248
More information about the llvm-branch-commits
mailing list