summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-16 01:24:12 +0000
committerChris Lattner <sabre@nondot.org>2006-08-16 01:24:12 +0000
commitfe854034677f59baca1e38075e71f6efca247a03 (patch)
treefb271b47b99ed66ee0ac9f890b9d7bcfddc02aed /include/llvm/ExecutionEngine
parent2e6baf626d2096eade89e5305bc09e369a761516 (diff)
downloadllvm-fe854034677f59baca1e38075e71f6efca247a03.tar.gz
llvm-fe854034677f59baca1e38075e71f6efca247a03.tar.bz2
llvm-fe854034677f59baca1e38075e71f6efca247a03.tar.xz
initial changes to support JIT'ing from multiple module providers, implicitly
linking the program on the fly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index 2a117f53be..59666743de 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -20,6 +20,7 @@
#include <cassert>
#include <string>
#include "llvm/System/Mutex.h"
+#include "llvm/ADT/SmallVector.h"
namespace llvm {
@@ -60,14 +61,13 @@ public:
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 @@ public:
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,