[llvm] fdf99b2 - [AMDGPU] Fix -Wunused-variable in SIFrameLowering.cpp (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 04:50:06 PST 2023


Author: Jie Fu
Date: 2023-11-08T20:48:44+08:00
New Revision: fdf99b21f3dbe1cbf286e2bcc443b59cf7d9b9be

URL: https://github.com/llvm/llvm-project/commit/fdf99b21f3dbe1cbf286e2bcc443b59cf7d9b9be
DIFF: https://github.com/llvm/llvm-project/commit/fdf99b21f3dbe1cbf286e2bcc443b59cf7d9b9be.diff

LOG: [AMDGPU] Fix -Wunused-variable in SIFrameLowering.cpp (NFC)

/llvm-project/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1829:8: error: unused variable 'IsChainFunction' [-Werror,-Wunused-variable]
  bool IsChainFunction = MF.getInfo<SIMachineFunctionInfo>()->isChainFunction();
       ^
1 error generated.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index 7889cc3aeea04cb..df6efdc29671ff6 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -1826,11 +1826,9 @@ bool SIFrameLowering::hasFP(const MachineFunction &MF) const {
 // functions may need to set up a stack pointer in some situations.
 bool SIFrameLowering::requiresStackPointerReference(
     const MachineFunction &MF) const {
-  bool IsChainFunction = MF.getInfo<SIMachineFunctionInfo>()->isChainFunction();
-
   // Callable functions always require a stack pointer reference.
   assert((MF.getInfo<SIMachineFunctionInfo>()->isEntryFunction() ||
-          IsChainFunction) &&
+          MF.getInfo<SIMachineFunctionInfo>()->isChainFunction()) &&
          "only expected to call this for entry points and chain functions");
 
   const MachineFrameInfo &MFI = MF.getFrameInfo();


        


More information about the llvm-commits mailing list