<div dir="ltr">Excellent. Thanks Rafael!<div><br></div><div>- Lang.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 9:02 AM, Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Thu Jul 24 11:02:28 2014<br>
New Revision: 213871<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=213871&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=213871&view=rev</a><br>
Log:<br>
Remove dead code.<br>
<br>
Every user has been switched to using EngineBuilder.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h<br>
    llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp<br>
    llvm/trunk/lib/ExecutionEngine/JIT/JIT.h<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=213871&r1=213870&r2=213871&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=213871&r1=213870&r2=213871&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Thu Jul 24 11:02:28 2014<br>
@@ -172,39 +172,6 @@ public:<br>
<br>
   virtual ~ExecutionEngine();<br>
<br>
-  /// create - This is the factory method for creating an execution engine which<br>
-  /// is appropriate for the current machine.  This takes ownership of the<br>
-  /// module.<br>
-  ///<br>
-  /// \param GVsWithCode - Allocating globals with code breaks<br>
-  /// freeMachineCodeForFunction and is probably unsafe and bad for performance.<br>
-  /// However, we have clients who depend on this behavior, so we must support<br>
-  /// it.  Eventually, when we're willing to break some backwards compatibility,<br>
-  /// this flag should be flipped to false, so that by default<br>
-  /// freeMachineCodeForFunction works.<br>
-  static ExecutionEngine *create(Module *M,<br>
-                                 bool ForceInterpreter = false,<br>
-                                 std::string *ErrorStr = nullptr,<br>
-                                 CodeGenOpt::Level OptLevel =<br>
-                                 CodeGenOpt::Default,<br>
-                                 bool GVsWithCode = true);<br>
-<br>
-  /// createJIT - This is the factory method for creating a JIT for the current<br>
-  /// machine, it does not fall back to the interpreter.  This takes ownership<br>
-  /// of the Module and JITMemoryManager if successful.<br>
-  ///<br>
-  /// Clients should make sure to initialize targets prior to calling this<br>
-  /// function.<br>
-  static ExecutionEngine *createJIT(Module *M,<br>
-                                    std::string *ErrorStr = nullptr,<br>
-                                    JITMemoryManager *JMM = nullptr,<br>
-                                    CodeGenOpt::Level OptLevel =<br>
-                                    CodeGenOpt::Default,<br>
-                                    bool GVsWithCode = true,<br>
-                                    Reloc::Model RM = Reloc::Default,<br>
-                                    CodeModel::Model CMM =<br>
-                                    CodeModel::JITDefault);<br>
-<br>
   /// addModule - Add a Module to the list of modules that we can JIT from.<br>
   /// Note that this takes ownership of the Module: when the ExecutionEngine is<br>
   /// destroyed, it destroys the Module as well.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=213871&r1=213870&r2=213871&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=213871&r1=213870&r2=213871&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Thu Jul 24 11:02:28 2014<br>
@@ -406,57 +406,6 @@ int ExecutionEngine::runFunctionAsMain(F<br>
   return runFunction(Fn, GVArgs).IntVal.getZExtValue();<br>
 }<br>
<br>
-ExecutionEngine *ExecutionEngine::create(Module *M,<br>
-                                         bool ForceInterpreter,<br>
-                                         std::string *ErrorStr,<br>
-                                         CodeGenOpt::Level OptLevel,<br>
-                                         bool GVsWithCode) {<br>
-<br>
-  EngineBuilder EB =<br>
-      EngineBuilder(M)<br>
-          .setEngineKind(ForceInterpreter ? EngineKind::Interpreter<br>
-                                          : EngineKind::Either)<br>
-          .setErrorStr(ErrorStr)<br>
-          .setOptLevel(OptLevel)<br>
-          .setAllocateGVsWithCode(GVsWithCode);<br>
-<br>
-  return EB.create();<br>
-}<br>
-<br>
-/// createJIT - This is the factory method for creating a JIT for the current<br>
-/// machine, it does not fall back to the interpreter.  This takes ownership<br>
-/// of the module.<br>
-ExecutionEngine *ExecutionEngine::createJIT(Module *M,<br>
-                                            std::string *ErrorStr,<br>
-                                            JITMemoryManager *JMM,<br>
-                                            CodeGenOpt::Level OL,<br>
-                                            bool GVsWithCode,<br>
-                                            Reloc::Model RM,<br>
-                                            CodeModel::Model CMM) {<br>
-  if (!ExecutionEngine::JITCtor) {<br>
-    if (ErrorStr)<br>
-      *ErrorStr = "JIT has not been linked in.";<br>
-    return nullptr;<br>
-  }<br>
-<br>
-  // Use the defaults for extra parameters.  Users can use EngineBuilder to<br>
-  // set them.<br>
-  EngineBuilder EB(M);<br>
-  EB.setEngineKind(EngineKind::JIT);<br>
-  EB.setErrorStr(ErrorStr);<br>
-  EB.setRelocationModel(RM);<br>
-  EB.setCodeModel(CMM);<br>
-  EB.setAllocateGVsWithCode(GVsWithCode);<br>
-  EB.setOptLevel(OL);<br>
-  EB.setJITMemoryManager(JMM);<br>
-<br>
-  // TODO: permit custom TargetOptions here<br>
-  TargetMachine *TM = EB.selectTarget();<br>
-  if (!TM || (ErrorStr && ErrorStr->length() > 0)) return nullptr;<br>
-<br>
-  return ExecutionEngine::JITCtor(M, ErrorStr, JMM, GVsWithCode, TM);<br>
-}<br>
-<br>
 void EngineBuilder::InitEngine() {<br>
   WhichEngine = EngineKind::Either;<br>
   ErrorStr = nullptr;<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.h?rev=213871&r1=213870&r2=213871&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.h?rev=213871&r1=213870&r2=213871&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.h Thu Jul 24 11:02:28 2014<br>
@@ -91,21 +91,6 @@ public:<br>
   ///<br>
   TargetJITInfo &getJITInfo() const { return TJI; }<br>
<br>
-  /// create - Create an return a new JIT compiler if there is one available<br>
-  /// for the current target.  Otherwise, return null.<br>
-  ///<br>
-  static ExecutionEngine *create(Module *M,<br>
-                                 std::string *Err,<br>
-                                 JITMemoryManager *JMM,<br>
-                                 CodeGenOpt::Level OptLevel =<br>
-                                   CodeGenOpt::Default,<br>
-                                 bool GVsWithCode = true,<br>
-                                 Reloc::Model RM = Reloc::Default,<br>
-                                 CodeModel::Model CMM = CodeModel::JITDefault) {<br>
-    return ExecutionEngine::createJIT(M, Err, JMM, OptLevel, GVsWithCode,<br>
-                                      RM, CMM);<br>
-  }<br>
-<br>
   void addModule(Module *M) override;<br>
<br>
   /// removeModule - Remove a Module from the list of modules.  Returns true if<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>