diff options
| author | Bill Wendling <isanbard@gmail.com> | 2010-05-17 23:09:50 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2010-05-17 23:09:50 +0000 |
| commit | 02d3368831b9c6ae8c52f516c0db9c3d0a6b1926 (patch) | |
| tree | dfd9ccf1b17468817cd53e20364a3bc55d32a8aa /llvm/lib/Target/TargetMachine.cpp | |
| parent | 0510b48fd97cd37fe6297117d82bacb683c3aa39 (diff) | |
| download | bcm5719-llvm-02d3368831b9c6ae8c52f516c0db9c3d0a6b1926.tar.gz bcm5719-llvm-02d3368831b9c6ae8c52f516c0db9c3d0a6b1926.zip | |
- Set the "HasCalls" flag after instruction selection is finished.
- Change the logic DisableFramePointerElim() to check for the
-disable-non-leaf-fp-elim before -disable-fp-elim.
llvm-svn: 103990
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 |

