llvm.org GIT mirror llvm / 062cd94
Check only if we have this attribute. If it's not an attribute, then it's assumed false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189063 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
1 changed file(s) with 2 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2121 bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
2222 // Check to see if we should eliminate non-leaf frame pointers and then
2323 // check to see if we should eliminate all frame pointers.
24 bool NoFramePointerElimNonLeaf =
25 MF.getFunction()->getFnAttribute("no-frame-pointer-elim-non-leaf")
26 .getValueAsString() == "true";
27 if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
24 if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf") &&
25 !NoFramePointerElim) {
2826 const MachineFrameInfo *MFI = MF.getFrameInfo();
2927 return MFI->hasCalls();
3028 }