[llvm-branch-commits] [llvm-branch] r79045 - in /llvm/branches/Apple/Leela: lib/Target/ARM/ARMBaseRegisterInfo.cpp lib/Target/ARM/ARMBaseRegisterInfo.h test/CodeGen/Thumb2/frameless.ll
Bill Wendling
isanbard at gmail.com
Fri Aug 14 14:05:29 PDT 2009
Author: void
Date: Fri Aug 14 16:05:29 2009
New Revision: 79045
URL: http://llvm.org/viewvc/llvm-project?rev=79045&view=rev
Log:
$ svn merge -c 79039 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r79039 into '.':
A test/CodeGen/Thumb2/frameless.ll
U lib/Target/ARM/ARMBaseRegisterInfo.h
U lib/Target/ARM/ARMBaseRegisterInfo.cpp
Added:
llvm/branches/Apple/Leela/test/CodeGen/Thumb2/frameless.ll
- copied unchanged from r79039, llvm/trunk/test/CodeGen/Thumb2/frameless.ll
Modified:
llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.cpp
llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.h
Modified: llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=79045&r1=79044&r2=79045&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Aug 14 16:05:29 2009
@@ -440,6 +440,13 @@
MFI->isFrameAddressTaken());
}
+bool ARMBaseRegisterInfo::hasStackFrame(const MachineFunction &MF) const {
+ const MachineFrameInfo *MFI = MF.getFrameInfo();
+ if (NoFramePointerElim && MFI->hasCalls())
+ return true;
+ return MFI->hasVarSizedObjects() || MFI->isFrameAddressTaken();
+}
+
/// estimateStackSize - Estimate and return the size of the frame.
static unsigned estimateStackSize(MachineFunction &MF, MachineFrameInfo *MFI) {
const MachineFrameInfo *FFI = MF.getFrameInfo();
@@ -589,7 +596,7 @@
}
bool ExtraCSSpill = false;
- if (!CanEliminateFrame || hasFP(MF)) {
+ if (!CanEliminateFrame || hasStackFrame(MF)) {
AFI->setHasStackFrame(true);
// If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
Modified: llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.h?rev=79045&r1=79044&r2=79045&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.h (original)
+++ llvm/branches/Apple/Leela/lib/Target/ARM/ARMBaseRegisterInfo.h Fri Aug 14 16:05:29 2009
@@ -89,6 +89,8 @@
bool hasFP(const MachineFunction &MF) const;
+ bool hasStackFrame(const MachineFunction &MF) const;
+
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
RegScavenger *RS = NULL) const;
More information about the llvm-branch-commits
mailing list