aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
-rw-r--r--lib/Target/TargetMachine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index ac67c91..1991198 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -273,13 +273,14 @@ namespace llvm {
/// DisableFramePointerElim - This returns true if frame pointer elimination
/// optimization should be disabled for the given machine function.
bool DisableFramePointerElim(const MachineFunction &MF) {
- if (NoFramePointerElim)
- return true;
+ // Check to see if we should eliminate non-leaf frame pointers and then
+ // check to see if we should eliminate all frame pointers.
if (NoFramePointerElimNonLeaf) {
const MachineFrameInfo *MFI = MF.getFrameInfo();
return MFI->hasCalls();
}
- return false;
+
+ return NoFramePointerElim;
}
/// LessPreciseFPMAD - This flag return true when -enable-fp-mad option