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

Chris Lattner lattner at cs.uiuc.edu
Tue Mar 21 22:08:04 PST 2006



Changes in directory llvm/lib/ExecutionEngine/JIT:

JIT.cpp updated: 1.59 -> 1.60
JIT.h updated: 1.27 -> 1.28
---
Log message:

Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.

Now you can build a tool with just the JIT or just the interpreter.


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

 JIT.cpp |    5 ++++-
 JIT.h   |    4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)


Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.59 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.60
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.59	Sat Jan  7 00:12:07 2006
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp	Wed Mar 22 00:07:50 2006
@@ -26,9 +26,12 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetJITInfo.h"
 #include <iostream>
-
 using namespace llvm;
 
+static struct RegisterJIT {
+  RegisterJIT() { JIT::Register(); }
+} JITRegistrator;
+
 JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji)
   : ExecutionEngine(MP), TM(tm), TJI(tji), state(MP) {
   setTargetData(TM.getTargetData());


Index: llvm/lib/ExecutionEngine/JIT/JIT.h
diff -u llvm/lib/ExecutionEngine/JIT/JIT.h:1.27 llvm/lib/ExecutionEngine/JIT/JIT.h:1.28
--- llvm/lib/ExecutionEngine/JIT/JIT.h:1.27	Tue Jul 12 10:51:55 2005
+++ llvm/lib/ExecutionEngine/JIT/JIT.h	Wed Mar 22 00:07:50 2006
@@ -60,6 +60,10 @@
 public:
   ~JIT();
 
+  static void Register() {
+    JITCtor = create;
+  }
+  
   /// getJITInfo - Return the target JIT information structure.
   ///
   TargetJITInfo &getJITInfo() const { return TJI; }






More information about the llvm-commits mailing list