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 | c07ed1387503d25c0b93fcf617f69329d73fc589 (patch) | |
tree | 0e4f7ecf9cc5a7b3e891af61bda90a5ee3a4853e /lib/ExecutionEngine/JIT/JIT.h | |
parent | 1514b5b334c72e1e190fe1ce2bce7bf7d8a91c1a (diff) | |
download | external_llvm-c07ed1387503d25c0b93fcf617f69329d73fc589.tar.gz external_llvm-c07ed1387503d25c0b93fcf617f69329d73fc589.tar.bz2 external_llvm-c07ed1387503d25c0b93fcf617f69329d73fc589.zip |
Implement PR135, lazy emission of global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.h')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h index adf4e46e77..76d2b7a917 100644 --- a/lib/ExecutionEngine/JIT/JIT.h +++ b/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. |