r189064 - Only add this attribute when it's set. If it's not there, the assumption is that it's off.

Bill Wendling isanbard at gmail.com
Thu Aug 22 14:16:51 PDT 2013


Author: void
Date: Thu Aug 22 16:16:51 2013
New Revision: 189064

URL: http://llvm.org/viewvc/llvm-project?rev=189064&view=rev
Log:
Only add this attribute when it's set. If it's not there, the assumption is that it's off.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=189064&r1=189063&r2=189064&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Aug 22 16:16:51 2013
@@ -1058,13 +1058,12 @@ void CodeGenModule::ConstructAttributeLi
     // Attributes that should go on the function, but not the call site.
     if (!CodeGenOpts.DisableFPElim) {
       FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
-      FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "false");
     } else if (CodeGenOpts.OmitLeafFramePointer) {
       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 {
       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",
@@ -1080,18 +1079,6 @@ void CodeGenModule::ConstructAttributeLi
     FuncAttrs.addAttribute("stack-protector-buffer-size",
                            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)
       FuncAttrs.addAttribute("no-realign-stack");
   }





More information about the cfe-commits mailing list