[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Dec 28 03:45:07 PST 2003


Changes in directory llvm/lib/ExecutionEngine:

ExecutionEngine.cpp updated: 1.43 -> 1.44

---
Log message:

Pass around IntrinsicLowering instances as appropriate.
Reimplement the Interpreters implementation of va_* to be more direct.


---
Diffs of the changes:  (+8 -4)

Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.43 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.44
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.43	Fri Dec 26 00:50:30 2003
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp	Sun Dec 28 03:44:36 2003
@@ -17,6 +17,7 @@
 #include "JIT/JIT.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
+#include "llvm/IntrinsicLowering.h"
 #include "llvm/Module.h"
 #include "llvm/ModuleProvider.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
@@ -105,20 +106,23 @@
 /// NULL is returned. 
 ///
 ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, 
-                                         bool ForceInterpreter) {
+                                         bool ForceInterpreter,
+                                         IntrinsicLowering *IL) {
   ExecutionEngine *EE = 0;
 
-  // Unless the interpreter was explicitly selected, make a JIT.
+  // Unless the interpreter was explicitly selected, try making a JIT.
   if (!ForceInterpreter)
-    EE = JIT::create(MP);
+    EE = JIT::create(MP, IL);
 
   // If we can't make a JIT, make an interpreter instead.
   try {
     if (EE == 0)
-      EE = Interpreter::create(MP->materializeModule());
+      EE = Interpreter::create(MP->materializeModule(), IL);
   } catch (...) {
     EE = 0;
   }
+
+  if (EE == 0) delete IL;
   return EE;
 }
 





More information about the llvm-commits mailing list