[llvm-commits] CVS: llvm/include/llvm/ExecutionEngine/ExecutionEngine.h

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 15 18:24:29 PDT 2006



Changes in directory llvm/include/llvm/ExecutionEngine:

ExecutionEngine.h updated: 1.38 -> 1.39
---
Log message:

initial changes to support JIT'ing from multiple module providers, implicitly
linking the program on the fly.


---
Diffs of the changes:  (+11 -6)

 ExecutionEngine.h |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
diff -u llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.38 llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.39
--- llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.38	Mon May  8 17:00:26 2006
+++ llvm/include/llvm/ExecutionEngine/ExecutionEngine.h	Tue Aug 15 20:24:12 2006
@@ -20,6 +20,7 @@
 #include <cassert>
 #include <string>
 #include "llvm/System/Mutex.h"
+#include "llvm/ADT/SmallVector.h"
 
 namespace llvm {
 
@@ -60,14 +61,13 @@
 
 
 class ExecutionEngine {
-  Module &CurMod;
   const TargetData *TD;
-
   ExecutionEngineState state;
-
 protected:
-  ModuleProvider *MP;
-
+  /// Modules - This is a list of ModuleProvider's that we are JIT'ing from.  We
+  /// use a smallvector to optimize for the case where there is only one module.
+  SmallVector<ModuleProvider*, 1> Modules;
+  
   void setTargetData(const TargetData *td) {
     TD = td;
   }
@@ -88,9 +88,14 @@
   ExecutionEngine(Module *M);
   virtual ~ExecutionEngine();
 
-  Module &getModule() const { return CurMod; }
+  //Module &getModule() const { return CurMod; }
   const TargetData *getTargetData() const { return TD; }
 
+  /// FindFunctionNamed - Search all of the active modules to find the one that
+  /// defines FnName.  This is very slow operation and shouldn't be used for
+  /// general code.
+  Function *FindFunctionNamed(const char *FnName);
+  
   /// create - This is the factory method for creating an execution engine which
   /// is appropriate for the current machine.
   static ExecutionEngine *create(ModuleProvider *MP,






More information about the llvm-commits mailing list