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

specified.

llvm-svn: 104066
This commit is contained in:
Bill Wendling 2010-05-18 21:47:08 +00:00
parent 887dd1cd31
commit 4ed63f8687
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ namespace llvm {
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 all frame pointers.
if (NoFramePointerElimNonLeaf) {
if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
const MachineFrameInfo *MFI = MF.getFrameInfo();
return MFI->hasCalls();
}