diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-20 03:36:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-20 03:36:47 +0000 |
commit | fbcc0aa18d01fd1e2af833f48b58ac091d421676 (patch) | |
tree | 53c5ba73de80379c1a744e4fb006a308e80e00ae /llvm/lib/ExecutionEngine/JIT/JIT.h | |
parent | 620ac15114e79a4cd6906ec4c4eb4d2da34f4ce7 (diff) | |
download | bcm5719-llvm-fbcc0aa18d01fd1e2af833f48b58ac091d421676.tar.gz bcm5719-llvm-fbcc0aa18d01fd1e2af833f48b58ac091d421676.zip |
Implement PR135, lazy emission of global variables
llvm-svn: 10549
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.h b/llvm/lib/ExecutionEngine/JIT/JIT.h index adf4e46e779..76d2b7a9170 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.h +++ b/llvm/lib/ExecutionEngine/JIT/JIT.h @@ -34,6 +34,11 @@ class JIT : public ExecutionEngine { 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; + JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji); public: ~JIT(); @@ -69,6 +74,11 @@ public: /// void *getPointerToFunction(Function *F); + /// getOrEmitGlobalVariable - Return the address of the specified global + /// variable, possibly emitting it to memory if needed. This is used by the + /// Emitter. + void *getOrEmitGlobalVariable(const GlobalVariable *GV); + /// getPointerToFunctionOrStub - If the specified function has been /// code-gen'd, return a pointer to the function. If not, compile it, or use /// a stub to implement lazy compilation if available. |