LLVM API Documentation
#include "JIT.h"#include "llvm/Constant.h"#include "llvm/Module.h"#include "llvm/Type.h"#include "llvm/CodeGen/MachineCodeEmitter.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineRelocation.h"#include "llvm/Target/TargetData.h"#include "llvm/Target/TargetJITInfo.h"#include "llvm/Support/Debug.h"#include "llvm/ADT/Statistic.h"#include "llvm/System/Memory.h"#include <algorithm>#include <iostream>#include <list>Include dependency graph for JITEmitter.cpp:

Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "jit" |
Functions | |
| static JITResolver & | getJITResolver (MachineCodeEmitter *MCE=0) |
| void * | getPointerToNamedFunction (const char *Name) |
Variables | |
| Statistic | NumBytes ("jit","Number of bytes of machine code compiled") |
| Statistic | NumRelos ("jit","Number of relocations applied") |
| JIT * | TheJIT = 0 |
| std::list< sys::MemoryBlock > | Blocks |
| unsigned char * | FunctionBase |
| unsigned char * | GlobalBase |
| unsigned char * | ConstantBase |
| unsigned char * | CurStubPtr |
| unsigned char * | CurFunctionPtr |
| unsigned char * | CurConstantPtr |
| unsigned char * | CurGlobalPtr |
| unsigned char * | GOTBase |
| std::map< Function *, void * > | FunctionToStubMap |
| std::map< void *, Function * > | StubToFunctionMap |
| MachineCodeEmitter & | MCE |
| MCE - The MachineCodeEmitter to use to emit stubs with. | |
| TargetJITInfo::LazyResolverFn | LazyResolverFn |
| JITResolverState | state |
| std::map< void *, void * > | ExternalFnToStubMap |
| std::map< void *, unsigned > | revGOTMap |
| unsigned | nextGOTIndex |
| JITMemoryManager | MemMgr |
| unsigned char * | CurBlock |
| unsigned char * | CurByte |
| unsigned char * | SavedCurBlock |
| unsigned char * | SavedCurByte |
| std::vector< MachineRelocation > | Relocations |
| MachineConstantPool * | ConstantPool |
| void * | ConstantPoolBase |
| #define DEBUG_TYPE "jit" |
Definition at line 15 of file JITEmitter.cpp.
| static JITResolver& getJITResolver | ( | MachineCodeEmitter * | MCE = 0 |
) | [static] |
getJITResolver - This function returns the one instance of the JIT resolver.
Definition at line 279 of file JITEmitter.cpp.
References MCE.
Referenced by llvm::JIT::getPointerToFunctionOrStub().
| void* getPointerToNamedFunction | ( | const char * | Name | ) |
Definition at line 646 of file JITEmitter.cpp.
References F, llvm::ExecutionEngine::getModule(), llvm::Module::getNamedFunction(), llvm::JIT::getPointerToFunction(), llvm::JIT::getPointerToNamedFunction(), M, and TheJIT.
| std::list<sys::MemoryBlock> Blocks |
Definition at line 53 of file JITEmitter.cpp.
Referenced by llvm::ReversePostOrderTraversal< GraphT, GT >::begin(), llvm::ReversePostOrderTraversal< GraphT, GT >::end(), and llvm::ExtractBasicBlock().
| unsigned char* ConstantBase |
Definition at line 56 of file JITEmitter.cpp.
ConstantPool - The constant pool for the current function.
Definition at line 428 of file JITEmitter.cpp.
| void* ConstantPoolBase |
ConstantPoolBase - A pointer to the first entry in the constant pool.
Definition at line 432 of file JITEmitter.cpp.
| unsigned char* CurBlock |
| unsigned char * CurByte |
Definition at line 416 of file JITEmitter.cpp.
| unsigned char * CurConstantPtr |
Definition at line 57 of file JITEmitter.cpp.
| unsigned char * CurFunctionPtr |
Definition at line 57 of file JITEmitter.cpp.
| unsigned char * CurGlobalPtr |
Definition at line 57 of file JITEmitter.cpp.
| unsigned char* CurStubPtr |
Definition at line 57 of file JITEmitter.cpp.
| std::map<void*, void*> ExternalFnToStubMap |
ExternalFnToStubMap - This is the equivalent of FunctionToStubMap for external functions.
Definition at line 235 of file JITEmitter.cpp.
| unsigned char* FunctionBase |
Definition at line 54 of file JITEmitter.cpp.
| std::map<Function*, void*> FunctionToStubMap |
FunctionToStubMap - Keep track of the stub created for a particular function so that we can reuse them if necessary.
Definition at line 203 of file JITEmitter.cpp.
| unsigned char* GlobalBase |
Definition at line 55 of file JITEmitter.cpp.
| unsigned char* GOTBase |
Definition at line 58 of file JITEmitter.cpp.
LazyResolverFn - The target lazy resolver function that we actually rewrite instructions to use.
Definition at line 229 of file JITEmitter.cpp.
MCE - The MachineCodeEmitter to use to emit stubs with.
Definition at line 225 of file JITEmitter.cpp.
| JITMemoryManager MemMgr |
Definition at line 412 of file JITEmitter.cpp.
| unsigned nextGOTIndex |
Definition at line 239 of file JITEmitter.cpp.
Referenced by llvm::X86RegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::IA64RegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitPrologue(), llvm::SparcRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::PPCTargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerCallTo(), and llvm::AlphaTargetLowering::LowerCallTo().
| std::vector<MachineRelocation> Relocations |
Relocations - These are the relocations that the function needs, as emitted.
Definition at line 424 of file JITEmitter.cpp.
| std::map<void*, unsigned> revGOTMap |
Definition at line 238 of file JITEmitter.cpp.
| unsigned char* SavedCurBlock |
Definition at line 420 of file JITEmitter.cpp.
| unsigned char * SavedCurByte |
Definition at line 420 of file JITEmitter.cpp.
| JITResolverState state |
Definition at line 231 of file JITEmitter.cpp.
| std::map<void*, Function*> StubToFunctionMap |
StubToFunctionMap - Keep track of the function that each stub corresponds to.
Definition at line 207 of file JITEmitter.cpp.