Remove some redundant checks.
authorBob Wilson <bob.wilson@apple.com>
Tue, 20 Mar 2012 19:28:22 +0000 (19:28 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 20 Mar 2012 19:28:22 +0000 (19:28 +0000)
ARMFrameLowering::hasReservedCallFrame is already checking for variable
sized objects, so there's no point in checking it twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153109 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMFrameLowering.cpp

index f73555ba3ac11d0aa1623a27a853cad162bdc16c..8fd77e54500f74ff21da9f13980eb5262cdeecd3 100644 (file)
@@ -493,8 +493,7 @@ bool ARMBaseRegisterInfo::hasBasePointer(const MachineFunction &MF) const {
   // When outgoing call frames are so large that we adjust the stack pointer
   // around the call, we can no longer use the stack pointer to reach the
   // emergency spill slot.
-  if (needsStackRealignment(MF) && (MFI->hasVarSizedObjects() ||
-                                    !TFI->hasReservedCallFrame(MF)))
+  if (needsStackRealignment(MF) && !TFI->hasReservedCallFrame(MF))
     return true;
 
   // Thumb has trouble with negative offsets from the FP. Thumb2 has a limited
index 0fd60254dfab9d73ffd0c63336dfed6b1ca1112c..bd4b2a9da98b5238b6a28be61e1b8947da0f352b 100644 (file)
@@ -501,7 +501,7 @@ ARMFrameLowering::ResolveFrameIndexReference(const MachineFunction &MF,
 
   // SP can move around if there are allocas.  We may also lose track of SP
   // when emergency spilling inside a non-reserved call frame setup.
-  bool hasMovingSP = MFI->hasVarSizedObjects() || !hasReservedCallFrame(MF);
+  bool hasMovingSP = !hasReservedCallFrame(MF);
 
   // When dynamically realigning the stack, use the frame pointer for
   // parameters, and the stack/base pointer for locals.