[PATCH] D86291: [AMDGPU] allSGPRSpillsAreDead() should use actual FP/BP frame indices
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 13:17:03 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG54d8ded4b19a: allSGPRSpillsAreDead() should use actual FP/BP frame indices (authored by RamNalamothu, committed by arsenm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86291/new/
https://reviews.llvm.org/D86291
Files:
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -1076,15 +1076,15 @@
}
#ifndef NDEBUG
-static bool allSGPRSpillsAreDead(const MachineFrameInfo &MFI,
- Optional<int> FramePointerSaveIndex,
- Optional<int> BasePointerSaveIndex) {
+static bool allSGPRSpillsAreDead(const MachineFunction &MF) {
+ const MachineFrameInfo &MFI = MF.getFrameInfo();
+ const SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
for (int I = MFI.getObjectIndexBegin(), E = MFI.getObjectIndexEnd();
I != E; ++I) {
if (!MFI.isDeadObjectIndex(I) &&
MFI.getStackID(I) == TargetStackID::SGPRSpill &&
- ((FramePointerSaveIndex && I != FramePointerSaveIndex) ||
- (BasePointerSaveIndex && I != BasePointerSaveIndex))) {
+ (I != FuncInfo->FramePointerSaveIndex &&
+ I != FuncInfo->BasePointerSaveIndex)) {
return false;
}
}
@@ -1111,7 +1111,7 @@
SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
FuncInfo->removeDeadFrameIndices(MFI);
- assert(allSGPRSpillsAreDead(MFI, None, None) &&
+ assert(allSGPRSpillsAreDead(MF) &&
"SGPR spill should have been removed in SILowerSGPRSpills");
// FIXME: The other checks should be redundant with allStackObjectsAreDead,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86291.286890.patch
Type: text/x-patch
Size: 1496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200820/edb45ef5/attachment.bin>
More information about the llvm-commits
mailing list