[llvm] 583ef13 - [MCJIT] Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 24 17:16:12 PST 2019


Author: Fangrui Song
Date: 2019-12-24T17:12:21-08:00
New Revision: 583ef13f0be7b0045f9508dfceee17ab4ef4b1ea

URL: https://github.com/llvm/llvm-project/commit/583ef13f0be7b0045f9508dfceee17ab4ef4b1ea
DIFF: https://github.com/llvm/llvm-project/commit/583ef13f0be7b0045f9508dfceee17ab4ef4b1ea.diff

LOG: [MCJIT] Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
index c741fe2b3778..ff1e8050c7e7 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
@@ -183,13 +183,13 @@ LLVMBool LLVMCreateMCJITCompilerForModule(
   std::unique_ptr<Module> Mod(unwrap(M));
 
   if (Mod)
-    // Set function attribute "no-frame-pointer-elim" based on
+    // Set function attribute "frame-pointer" based on
     // NoFramePointerElim.
     for (auto &F : *Mod) {
       auto Attrs = F.getAttributes();
-      StringRef Value(options.NoFramePointerElim ? "true" : "false");
+      StringRef Value = options.NoFramePointerElim ? "all" : "none";
       Attrs = Attrs.addAttribute(F.getContext(), AttributeList::FunctionIndex,
-                                 "no-frame-pointer-elim", Value);
+                                 "frame-pointer", Value);
       F.setAttributes(Attrs);
     }
 


        


More information about the llvm-commits mailing list