[llvm] r223092 - Try to fix a bot failure due to a variable used only in an assert.

Philip Reames listmail at philipreames.com
Mon Dec 1 15:27:45 PST 2014


Author: reames
Date: Mon Dec  1 17:27:45 2014
New Revision: 223092

URL: http://llvm.org/viewvc/llvm-project?rev=223092&view=rev
Log:
Try to fix a bot failure due to a variable used only in an assert.

Specifically, bot lld-x86_64-darwin13.  Resulting from change 223085.


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=223092&r1=223091&r2=223092&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Mon Dec  1 17:27:45 2014
@@ -1137,13 +1137,13 @@ int X86FrameLowering::getFrameIndexRefer
 
 // Simplified from getFrameIndexOffset keeping only StackPointer cases
 int X86FrameLowering::getFrameIndexOffsetFromSP(const MachineFunction &MF, int FI) const {
-  const X86RegisterInfo *RegInfo =
-    static_cast<const X86RegisterInfo*>(MF.getSubtarget().getRegisterInfo());
   const MachineFrameInfo *MFI = MF.getFrameInfo();
-  const uint64_t StackSize = MFI->getStackSize(); //not including dynamic realign
-
+  // Does not include any dynamic realign.
+  const uint64_t StackSize = MFI->getStackSize(); 
   {
 #ifndef NDEBUG
+    const X86RegisterInfo *RegInfo =
+      static_cast<const X86RegisterInfo*>(MF.getSubtarget().getRegisterInfo());
     // Note: LLVM arranges the stack as:
     // Args > Saved RetPC (<--FP) > CSRs > dynamic alignment (<--BP)
     //      > "Stack Slots" (<--SP)





More information about the llvm-commits mailing list