From 4ed63f8687923e1a6c05500078d644f659a8b29b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 18 May 2010 21:47:08 +0000 Subject: [PATCH] Don't eliminate frame pointers from leaf functions if "--disable-fp-elim" is specified. llvm-svn: 104066 --- llvm/lib/Target/TargetMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 199119850b23..b947b786a4ff 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -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(); }