summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-24 19:11:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-24 19:11:41 +0000
commit4df029cc74e5ec124f14a5682e44999ce4f086df (patch)
treefa2e8720472930df97920b4185215c910159f10d /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
parent950076cd18f3fa9d789b4add9d405898efff09a5 (diff)
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index dc63ae44c528..9ff66a094f99 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -548,7 +548,8 @@ private:
bool allocateVirtualVGPRForSGPRSpills(MachineFunction &MF, int FI,
unsigned LaneIndex);
bool allocatePhysicalVGPRForSGPRSpills(MachineFunction &MF, int FI,
- unsigned LaneIndex);
+ unsigned LaneIndex,
+ bool IsPrologEpilog);
public:
Register getVGPRForAGPRCopy() const {
@@ -588,6 +589,7 @@ public:
}
ArrayRef<Register> getSGPRSpillVGPRs() const { return SpillVGPRs; }
+
const WWMSpillsMap &getWWMSpills() const { return WWMSpills; }
const ReservedRegSet &getWWMReservedRegs() const { return WWMReservedRegs; }
@@ -702,7 +704,12 @@ public:
I->second.IsDead = true;
}
+ // To bring the Physical VGPRs in the highest range allocated for CSR SGPR
+ // spilling into the lowest available range.
+ void shiftSpillPhysVGPRsToLowestRange(MachineFunction &MF);
+
bool allocateSGPRSpillToVGPRLane(MachineFunction &MF, int FI,
+ bool SpillToPhysVGPRLane = false,
bool IsPrologEpilog = false);
bool allocateVGPRSpillToAGPR(MachineFunction &MF, int FI, bool isAGPRtoVGPR);
@@ -1041,22 +1048,6 @@ public:
return WavesPerEU.second;
}
- /// \returns SGPR used for \p Dim's work group ID.
- Register getWorkGroupIDSGPR(unsigned Dim) const {
- switch (Dim) {
- case 0:
- assert(hasWorkGroupIDX());
- return ArgInfo.WorkGroupIDX.getRegister();
- case 1:
- assert(hasWorkGroupIDY());
- return ArgInfo.WorkGroupIDY.getRegister();
- case 2:
- assert(hasWorkGroupIDZ());
- return ArgInfo.WorkGroupIDZ.getRegister();
- }
- llvm_unreachable("unexpected dimension");
- }
-
const AMDGPUGWSResourcePseudoSourceValue *
getGWSPSV(const AMDGPUTargetMachine &TM) {
return &GWSResourcePSV;