Only add this attribute when it's set. If it's not there, the assumption is that it's off.
llvm-svn: 189064
This commit is contained in:
parent
fe88aea706
commit
17d1b61480
|
@ -1058,13 +1058,12 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
|
||||||
// Attributes that should go on the function, but not the call site.
|
// Attributes that should go on the function, but not the call site.
|
||||||
if (!CodeGenOpts.DisableFPElim) {
|
if (!CodeGenOpts.DisableFPElim) {
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
|
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "false");
|
|
||||||
} else if (CodeGenOpts.OmitLeafFramePointer) {
|
} else if (CodeGenOpts.OmitLeafFramePointer) {
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
|
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "true");
|
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf");
|
||||||
} else {
|
} else {
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim", "true");
|
FuncAttrs.addAttribute("no-frame-pointer-elim", "true");
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "true");
|
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf");
|
||||||
}
|
}
|
||||||
|
|
||||||
FuncAttrs.addAttribute("less-precise-fpmad",
|
FuncAttrs.addAttribute("less-precise-fpmad",
|
||||||
|
@ -1080,18 +1079,6 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
|
||||||
FuncAttrs.addAttribute("stack-protector-buffer-size",
|
FuncAttrs.addAttribute("stack-protector-buffer-size",
|
||||||
llvm::utostr(CodeGenOpts.SSPBufferSize));
|
llvm::utostr(CodeGenOpts.SSPBufferSize));
|
||||||
|
|
||||||
bool NoFramePointerElimNonLeaf;
|
|
||||||
if (!CodeGenOpts.DisableFPElim) {
|
|
||||||
NoFramePointerElimNonLeaf = false;
|
|
||||||
} else if (CodeGenOpts.OmitLeafFramePointer) {
|
|
||||||
NoFramePointerElimNonLeaf = true;
|
|
||||||
} else {
|
|
||||||
NoFramePointerElimNonLeaf = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
|
|
||||||
llvm::toStringRef(NoFramePointerElimNonLeaf));
|
|
||||||
|
|
||||||
if (!CodeGenOpts.StackRealignment)
|
if (!CodeGenOpts.StackRealignment)
|
||||||
FuncAttrs.addAttribute("no-realign-stack");
|
FuncAttrs.addAttribute("no-realign-stack");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue