OSDN Git Service

Remove set but unused variable.
authorBill Wendling <isanbard@gmail.com>
Mon, 15 Jul 2019 06:35:28 +0000 (06:35 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 15 Jul 2019 06:35:28 +0000 (06:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366041 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SILowerSGPRSpills.cpp

index 9a93e84..a820474 100644 (file)
@@ -250,7 +250,6 @@ bool SILowerSGPRSpills::runOnMachineFunction(MachineFunction &MF) {
 
   MachineRegisterInfo &MRI = MF.getRegInfo();
   SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
-  bool AllSGPRSpilledToVGPRs = false;
   const bool SpillVGPRToAGPR = ST.hasMAIInsts() && FuncInfo->hasSpilledVGPRs()
     && EnableSpillVGPRToAGPR;
 
@@ -262,8 +261,6 @@ bool SILowerSGPRSpills::runOnMachineFunction(MachineFunction &MF) {
   // handled as SpilledToReg in regular PrologEpilogInserter.
   if ((TRI->spillSGPRToVGPR() && (HasCSRs || FuncInfo->hasSpilledSGPRs())) ||
       SpillVGPRToAGPR) {
-    AllSGPRSpilledToVGPRs = true;
-
     // Process all SGPR spills before frame offsets are finalized. Ideally SGPRs
     // are spilled to VGPRs, in which case we can eliminate the stack usage.
     //
@@ -299,8 +296,7 @@ bool SILowerSGPRSpills::runOnMachineFunction(MachineFunction &MF) {
           bool Spilled = TRI->eliminateSGPRToVGPRSpillFrameIndex(MI, FI, nullptr);
           (void)Spilled;
           assert(Spilled && "failed to spill SGPR to VGPR when allocated");
-        } else
-          AllSGPRSpilledToVGPRs = false;
+        }
       }
     }