aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-06 01:08:09 +0000
committerChris Lattner <sabre@nondot.org>2007-12-06 01:08:09 +0000
commit9f2f142d255bc96f109dd5c6524a485937b1f3a1 (patch)
tree60de6e06844b32d1ffd76090df4610c4920bb3cc /include/llvm/ExecutionEngine
parent7f3a75a5290ba4167403626849d666138383fd74 (diff)
downloadexternal_llvm-9f2f142d255bc96f109dd5c6524a485937b1f3a1.zip
external_llvm-9f2f142d255bc96f109dd5c6524a485937b1f3a1.tar.gz
external_llvm-9f2f142d255bc96f109dd5c6524a485937b1f3a1.tar.bz2
simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index 3ec2641..ad0a738 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef EXECUTION_ENGINE_H
-#define EXECUTION_ENGINE_H
+#ifndef LLVM_EXECUTION_ENGINE_H
+#define LLVM_EXECUTION_ENGINE_H
#include <vector>
#include <map>
@@ -34,6 +34,7 @@ class ModuleProvider;
class TargetData;
class Type;
class MutexGuard;
+class JITMemoryManager;
class ExecutionEngineState {
private:
@@ -90,18 +91,36 @@ public:
/// any of those classes.
sys::Mutex lock; // Used to make this class and subclasses thread-safe
- ExecutionEngine(ModuleProvider *P);
- ExecutionEngine(Module *M);
- virtual ~ExecutionEngine();
+ //===----------------------------------------------------------------------===//
+ // ExecutionEngine Startup
+ //===----------------------------------------------------------------------===//
- const TargetData *getTargetData() const { return TD; }
+ virtual ~ExecutionEngine();
+ /// create - This is the factory method for creating an execution engine which
+ /// is appropriate for the current machine. This takes ownership of the
+ /// module provider.
+ static ExecutionEngine *create(ModuleProvider *MP,
+ bool ForceInterpreter = false,
+ std::string *ErrorStr = 0);
+
+ /// create - This is the factory method for creating an execution engine which
+ /// is appropriate for the current machine. This takes ownership of the
+ /// module.
+ static ExecutionEngine *create(Module *M);
+
+
/// addModuleProvider - Add a ModuleProvider to the list of modules that we
/// can JIT from. Note that this takes ownership of the ModuleProvider: when
/// the ExecutionEngine is destroyed, it destroys the MP as well.
void addModuleProvider(ModuleProvider *P) {
Modules.push_back(P);
}
+
+ //===----------------------------------------------------------------------===//
+
+ const TargetData *getTargetData() const { return TD; }
+
/// removeModuleProvider - Remove a ModuleProvider from the list of modules.
/// Release module from ModuleProvider.
@@ -112,18 +131,6 @@ public:
/// 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. This takes ownership of the
- /// module provider.
- static ExecutionEngine *create(ModuleProvider *MP,
- bool ForceInterpreter = false,
- std::string *ErrorStr = 0);
-
- /// create - This is the factory method for creating an execution engine which
- /// is appropriate for the current machine. This takes ownership of the
- /// module.
- static ExecutionEngine *create(Module *M);
-
/// runFunction - Execute the specified function with the specified arguments,
/// and return the result.
///
@@ -233,6 +240,8 @@ public:
}
protected:
+ ExecutionEngine(ModuleProvider *P);
+
void emitGlobals();
// EmitGlobalVariable - This method emits the specified global variable to the