[dragonegg] r187105 - Try to update to set the no-frame-pointer-elim-non-leaf attribute as a function attribute instead of target option.
Bill Wendling
isanbard at gmail.com
Wed Jul 24 23:20:06 PDT 2013
Author: void
Date: Thu Jul 25 01:20:06 2013
New Revision: 187105
URL: http://llvm.org/viewvc/llvm-project?rev=187105&view=rev
Log:
Try to update to set the no-frame-pointer-elim-non-leaf attribute as a function attribute instead of target option.
Modified:
dragonegg/trunk/src/Backend.cpp
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=187105&r1=187104&r2=187105&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Thu Jul 25 01:20:06 2013
@@ -484,11 +484,9 @@ static void CreateTargetMachine(const st
if (flag_omit_frame_pointer) {
// Eliminate frame pointers everywhere.
Options.NoFramePointerElim = false;
- Options.NoFramePointerElimNonLeaf = false;
} else {
// Keep frame pointers everywhere.
Options.NoFramePointerElim = true;
- Options.NoFramePointerElimNonLeaf = true;
}
// If a target has an option to eliminate frame pointers in leaf functions
// only then it should set
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=187105&r1=187104&r2=187105&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Thu Jul 25 01:20:06 2013
@@ -1034,6 +1034,14 @@ void TreeToLLVM::StartFunctionBody() {
if (lookup_attribute("naked", DECL_ATTRIBUTES(FnDecl)))
Fn->addFnAttr(Attribute::Naked);
+ if (flag_omit_frame_pointer) {
+ // Eliminate frame pointers everywhere.
+ Fn->addFnAttr("no-frame-pointer-elim-non-leaf", "false");
+ } else {
+ // Keep frame pointers everywhere.
+ Fn->addFnAttr("no-frame-pointer-elim-non-leaf", "true");
+ }
+
// Handle annotate attributes
if (DECL_ATTRIBUTES(FnDecl))
AddAnnotateAttrsToGlobal(Fn, FnDecl);
More information about the llvm-commits
mailing list