[llvm] r307457 - Remove a variable that was only used in asserts and had a duplicate copy in something we did use anyhow.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 18:03:30 PDT 2017


Author: echristo
Date: Fri Jul  7 18:03:29 2017
New Revision: 307457

URL: http://llvm.org/viewvc/llvm-project?rev=307457&view=rev
Log:
Remove a variable that was only used in asserts and had a duplicate copy in something we did use anyhow.

Modified:
    llvm/trunk/lib/Target/X86/X86FrameLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=307457&r1=307456&r2=307457&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Fri Jul  7 18:03:29 2017
@@ -972,7 +972,6 @@ void X86FrameLowering::emitPrologue(Mach
     X86FI->setCalleeSavedFrameSize(
       X86FI->getCalleeSavedFrameSize() - TailCallReturnAddrDelta);
 
-  bool UseRedZone = false;
   bool UseStackProbe = !STI.getTargetLowering()->getStackProbeSymbolName(MF).empty();
 
   // The default stack probe size is 4096 if the function has no stackprobesize
@@ -1011,7 +1010,6 @@ void X86FrameLowering::emitPrologue(Mach
     X86FI->setUsesRedZone(MinSize > 0 || StackSize > 0);
     StackSize = std::max(MinSize, StackSize > 128 ? StackSize - 128 : 0);
     MFI.setStackSize(StackSize);
-    UseRedZone = true;
   }
 
   // Insert stack pointer adjustment for later moving of return addr.  Only
@@ -1189,7 +1187,8 @@ void X86FrameLowering::emitPrologue(Mach
   if (IsWin64Prologue && !IsFunclet && TRI->needsStackRealignment(MF))
     AlignedNumBytes = alignTo(AlignedNumBytes, MaxAlign);
   if (AlignedNumBytes >= StackProbeSize && UseStackProbe) {
-    assert(!UseRedZone && "The Red Zone is not accounted for in stack probes");
+    assert(!X86FI->getUsesRedZone() &&
+           "The Red Zone is not accounted for in stack probes");
 
     // Check whether EAX is livein for this block.
     bool isEAXAlive = isEAXLiveIn(MBB);




More information about the llvm-commits mailing list