diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-01 23:24:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-01 23:24:36 +0000 |
commit | bba1b6df9a7ac36e3a479dfe953a9618c87db7bb (patch) | |
tree | e06890d4e225508e6c89b93331a38e36485d5df2 /lib/ExecutionEngine/JIT/VM.h | |
parent | 04b0b309c4d6e3a381edbb2db6a23a0009661dd8 (diff) |
Move target specific code to target files. The new MachineCodeEmitter
class is actually target independent!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/VM.h')
-rw-r--r-- | lib/ExecutionEngine/JIT/VM.h | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/ExecutionEngine/JIT/VM.h b/lib/ExecutionEngine/JIT/VM.h index 58b7a3895b..7c378c41c8 100644 --- a/lib/ExecutionEngine/JIT/VM.h +++ b/lib/ExecutionEngine/JIT/VM.h @@ -22,12 +22,6 @@ class VM : public ExecutionEngine { PassManager PM; // Passes to compile a function MachineCodeEmitter *MCE; // MCE object - // FunctionRefs - A mapping between addresses that refer to unresolved - // functions and the LLVM function object itself. This is used by the fault - // handler to lazily patch up references... - // - std::map<void*, Function*> FunctionRefs; - public: VM(Module *M, TargetMachine *tm); ~VM(); @@ -37,14 +31,6 @@ public: virtual int run(const std::string &FnName, const std::vector<std::string> &Args); - void addFunctionRef(void *Ref, Function *F) { - FunctionRefs[Ref] = F; - } - - const std::string &getFunctionReferencedName(void *RefAddr); - - void *resolveFunctionReference(void *RefAddr); - /// getPointerToNamedFunction - This method returns the address of the /// specified function by using the dlsym function call. As such it is only /// useful for resolving library symbols, not code generated symbols. @@ -61,21 +47,14 @@ public: /// static void runAtExitHandlers(); + /// getPointerToFunction - This returns the address of the specified function, + /// compiling it if necessary. + void *getPointerToFunction(const Function *F); + private: static MachineCodeEmitter *createX86Emitter(VM &V); static MachineCodeEmitter *createSparcEmitter(VM &V); void setupPassManager(); - void *getPointerToFunction(const Function *F); - - void registerCallback(); - - /// emitStubForFunction - This method is used by the JIT when it needs to emit - /// the address of a function for a function whose code has not yet been - /// generated. In order to do this, it generates a stub which jumps to the - /// lazy function compiler, which will eventually get fixed to call the - /// function directly. - /// - void *emitStubForFunction(const Function &F); }; #endif |