diff options
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
| -rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index ac67c91f170..199119850b2 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/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 |

