aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JIT.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.h')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index 3c14cf71db..4cce144712 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -27,18 +27,35 @@ class TargetMachine;
class TargetJITInfo;
class MachineCodeEmitter;
-class JIT : public ExecutionEngine {
- TargetMachine &TM; // The current target we are compiling to
- TargetJITInfo &TJI; // The JITInfo for the target we are compiling to
-
+class JITState {
+private:
FunctionPassManager PM; // Passes to compile a function
- MachineCodeEmitter *MCE; // MCE object
/// PendingGlobals - Global variables which have had memory allocated for them
/// while a function was code generated, but which have not been initialized
/// yet.
std::vector<const GlobalVariable*> PendingGlobals;
+public:
+ JITState(ModuleProvider *MP) : PM(MP) {}
+
+ FunctionPassManager& getPM(const MutexGuard& locked) {
+ return PM;
+ }
+
+ std::vector<const GlobalVariable*>& getPendingGlobals(const MutexGuard& locked) {
+ return PendingGlobals;
+ }
+};
+
+
+class JIT : public ExecutionEngine {
+ TargetMachine &TM; // The current target we are compiling to
+ TargetJITInfo &TJI; // The JITInfo for the target we are compiling to
+ MachineCodeEmitter *MCE; // MCE object
+
+ JITState state;
+
JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji);
public:
~JIT();