LLVM API Documentation

llvm::X86JITInfo Class Reference

#include <X86JITInfo.h>

Inheritance diagram for llvm::X86JITInfo:

Inheritance graph
[legend]
Collaboration diagram for llvm::X86JITInfo:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 X86JITInfo (X86TargetMachine &tm)
virtual void addPassesToJITCompile (FunctionPassManager &PM)
virtual void replaceMachineCodeForFunction (void *Old, void *New)
virtual void * emitFunctionStub (void *Fn, MachineCodeEmitter &MCE)
virtual LazyResolverFn getLazyResolverFunction (JITCompilerFn)
 getLazyResolverFunction - Expose the lazy resolver to the JIT.
virtual void relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase)
virtual void resolveBBRefs (MachineCodeEmitter &MCE)

Detailed Description

Definition at line 23 of file X86JITInfo.h.


Constructor & Destructor Documentation

llvm::X86JITInfo::X86JITInfo ( X86TargetMachine tm  )  [inline]

Definition at line 26 of file X86JITInfo.h.

References llvm::TargetJITInfo::useGOT.


Member Function Documentation

void X86JITInfo::addPassesToJITCompile ( FunctionPassManager PM  )  [virtual]

addPassesToJITCompile - Add passes to the specified pass manager to implement a fast dynamic compiler for this target. Return true if this is not supported for this target.

Implements llvm::TargetJITInfo.

Definition at line 154 of file X86TargetMachine.cpp.

References llvm::FunctionPassManager::add(), llvm::createLoopStrengthReducePass(), llvm::createLowerGCPass(), llvm::createLowerInvokePass(), llvm::createMachineFunctionPrinterPass(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createUnreachableBlockEliminationPass(), llvm::createX86CodePrinterPass(), llvm::createX86FloatingPointStackifierPass(), llvm::createX86ISelDag(), llvm::X86TargetMachine::getTargetLowering(), llvm::PrintMachineCode, llvm::TargetMachine::setRelocationModel(), and llvm::Reloc::Static.

void X86JITInfo::replaceMachineCodeForFunction ( void *  Old,
void *  New 
) [virtual]

replaceMachineCodeForFunction - Make it so that calling the function whose machine code is at OLD turns into a call to NEW, perhaps by overwriting OLD with a branch to NEW. This is used for self-modifying code.

Implements llvm::TargetJITInfo.

Definition at line 28 of file X86JITInfo.cpp.

void * X86JITInfo::emitFunctionStub ( void *  Fn,
MachineCodeEmitter MCE 
) [virtual]

emitFunctionStub - Use the specified MachineCodeEmitter object to emit a small native function that simply calls the function at the specified address.

Reimplemented from llvm::TargetJITInfo.

Definition at line 164 of file X86JITInfo.cpp.

References llvm::MachineCodeEmitter::emitByte(), llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishFunctionStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), MCE, llvm::MachineCodeEmitter::startFunctionStub(), and X86CompilationCallback().

TargetJITInfo::LazyResolverFn X86JITInfo::getLazyResolverFunction ( JITCompilerFn   )  [virtual]

getLazyResolverFunction - Expose the lazy resolver to the JIT.

Definition at line 159 of file X86JITInfo.cpp.

References JITCompilerFunction, and X86CompilationCallback().

void X86JITInfo::relocate ( void *  Function,
MachineRelocation MR,
unsigned  NumRelocs,
unsigned char *  GOTBase 
) [virtual]

relocate - Before the JIT can run a block of code that has been emitted, it must rewrite the code to contain the actual addresses of any referenced global symbols.

Reimplemented from llvm::TargetJITInfo.

Definition at line 186 of file X86JITInfo.cpp.

References MR, llvm::X86::reloc_absolute_word, and llvm::X86::reloc_pcrel_word.

void X86JITInfo::resolveBBRefs ( MachineCodeEmitter MCE  )  [virtual]

resolveBBRefs - Resolve branches to BasicBlocks for the JIT emitted function.

Reimplemented from llvm::TargetJITInfo.

Definition at line 207 of file X86JITInfo.cpp.

References llvm::TargetJITInfo::BBRefs, llvm::MachineCodeEmitter::getMachineBasicBlockAddress(), MCE, and Ref.


The documentation for this class was generated from the following files: