[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
Mon Nov 9 02:06:42 PST 2026
================
@@ -10253,6 +10272,19 @@ SDValue SITargetLowering::LowerGlobalAddress(AMDGPUMachineFunctionInfo *MFI,
MachineMemOperand::MOInvariant);
}
+// The address is where AMDGPUPromoteAlloca placed the object, recorded on the
+// alloca. Every other frame index keeps its default lowering.
+SDValue SITargetLowering::lowerFrameIndex(SDValue Op, SelectionDAG &DAG) const {
+ MachineFunction &MF = DAG.getMachineFunction();
+ int FI = cast<FrameIndexSDNode>(Op)->getIndex();
+ const AllocaInst *Alloca = MF.getFrameInfo().getObjectAllocation(FI);
+ if (!Alloca || Alloca->getAddressSpace() != AMDGPUAS::VGPR)
+ return SDValue();
+
+ const auto &MD = AMDGPU::AllocatedVGPRsMetadata::get(*Alloca);
----------------
perlfu wrote:
This is just retrieving the metadata set by the earlier, right? So isn't allocating.
https://github.com/llvm/llvm-project/pull/214248
More information about the llvm-branch-commits
mailing list