[llvm] r364190 - [AMDGPU] Remove unused variable AllSGPRSpilledToVGPRs. NFC

Bjorn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 08:50:18 PDT 2019


Author: bjope
Date: Mon Jun 24 08:50:18 2019
New Revision: 364190

URL: http://llvm.org/viewvc/llvm-project?rev=364190&view=rev
Log:
[AMDGPU] Remove unused variable AllSGPRSpilledToVGPRs. NFC

Summary:
Removing the unused variable AllSGPRSpilledToVGPRs in
SIFrameLowering::processFunctionBeforeFrameFinalized
to avoid
  error: variable 'AllSGPRSpilledToVGPRs' set but not used
  [-Werror=unused-but-set-variable]

Reviewers: arsenm, nhaehnle

Reviewed By: nhaehnle

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63721

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

Modified: llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cpp?rev=364190&r1=364189&r2=364190&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cpp Mon Jun 24 08:50:18 2019
@@ -754,11 +754,8 @@ void SIFrameLowering::processFunctionBef
   const SIInstrInfo *TII = ST.getInstrInfo();
   const SIRegisterInfo &TRI = TII->getRegisterInfo();
   SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
-  bool AllSGPRSpilledToVGPRs = false;
 
   if (TRI.spillSGPRToVGPR() && FuncInfo->hasSpilledSGPRs()) {
-    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.
     //
@@ -780,8 +777,7 @@ void SIFrameLowering::processFunctionBef
             bool Spilled = TRI.eliminateSGPRToVGPRSpillFrameIndex(MI, FI, RS);
             (void)Spilled;
             assert(Spilled && "failed to spill SGPR to VGPR when allocated");
-          } else
-            AllSGPRSpilledToVGPRs = false;
+          }
         }
       }
     }




More information about the llvm-commits mailing list