[llvm] r366041 - Remove set but unused variable.

Bill Wendling via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 23:35:28 PDT 2019


Author: void
Date: Sun Jul 14 23:35:28 2019
New Revision: 366041

URL: http://llvm.org/viewvc/llvm-project?rev=366041&view=rev
Log:
Remove set but unused variable.

Modified:
    llvm/trunk/lib/Target/AMDGPU/SILowerSGPRSpills.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SILowerSGPRSpills.cpp?rev=366041&r1=366040&r2=366041&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SILowerSGPRSpills.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SILowerSGPRSpills.cpp Sun Jul 14 23:35:28 2019
@@ -250,7 +250,6 @@ bool SILowerSGPRSpills::runOnMachineFunc
 
   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::runOnMachineFunc
   // 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::runOnMachineFunc
           bool Spilled = TRI->eliminateSGPRToVGPRSpillFrameIndex(MI, FI, nullptr);
           (void)Spilled;
           assert(Spilled && "failed to spill SGPR to VGPR when allocated");
-        } else
-          AllSGPRSpilledToVGPRs = false;
+        }
       }
     }
 




More information about the llvm-commits mailing list