Don't eliminate frame pointers from leaf functions if "--disable-fp-elim" is

specified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104066 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2010-05-18 21:47:08 +00:00
parent e5efbafdac
commit 2abc93d0fb

View File

@ -275,7 +275,7 @@ namespace llvm {
bool DisableFramePointerElim(const MachineFunction &MF) { bool DisableFramePointerElim(const MachineFunction &MF) {
// Check to see if we should eliminate non-leaf frame pointers and then // Check to see if we should eliminate non-leaf frame pointers and then
// check to see if we should eliminate all frame pointers. // check to see if we should eliminate all frame pointers.
if (NoFramePointerElimNonLeaf) { if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
const MachineFrameInfo *MFI = MF.getFrameInfo(); const MachineFrameInfo *MFI = MF.getFrameInfo();
return MFI->hasCalls(); return MFI->hasCalls();
} }