Don't eliminate frame pointer by default at -O0 (#2483)

Fixes issue #2480.
This commit is contained in:
Martin Kinkelin 2018-01-13 13:49:10 +01:00 committed by GitHub
parent a4043a4bcc
commit ca6472c3b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 21 deletions

View file

@ -459,9 +459,8 @@ void applyTargetMachineAttributes(llvm::Function &func,
func.addFnAttr("no-infs-fp-math", TO.NoInfsFPMath ? "true" : "false");
func.addFnAttr("no-nans-fp-math", TO.NoNaNsFPMath ? "true" : "false");
// Frame pointer elimination
func.addFnAttr("no-frame-pointer-elim",
opts::disableFPElim() ? "true" : "false");
willEliminateFramePointer() ? "false" : "true");
}
} // anonymous namespace