mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 07:34:06 +00:00
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
This commit is contained in:
parent
b4be7f6b04
commit
062cd9437f
@ -22,10 +22,8 @@ using namespace llvm;
|
|||||||
bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
|
bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
|
||||||
// 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.
|
||||||
bool NoFramePointerElimNonLeaf =
|
if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf") &&
|
||||||
MF.getFunction()->getFnAttribute("no-frame-pointer-elim-non-leaf")
|
!NoFramePointerElim) {
|
||||||
.getValueAsString() == "true";
|
|
||||||
if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
|
|
||||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
return MFI->hasCalls();
|
return MFI->hasCalls();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user