LLVM API Documentation
#include <PPCJITInfo.h>
Inheritance diagram for llvm::PPCJITInfo:
Public Member Functions | |
PPCJITInfo (PPCTargetMachine &tm) | |
virtual void | addPassesToJITCompile (FunctionPassManager &PM) |
virtual void * | emitFunctionStub (void *Fn, MachineCodeEmitter &MCE) |
virtual LazyResolverFn | getLazyResolverFunction (JITCompilerFn) |
virtual void | relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase) |
virtual void | replaceMachineCodeForFunction (void *Old, void *New) |
virtual void | resolveBBRefs (MachineCodeEmitter &MCE) |
virtual void | synchronizeICache (const void *Addr, size_t Len) |
Protected Attributes | |
PPCTargetMachine & | TM |
Definition at line 22 of file PPCJITInfo.h.
llvm::PPCJITInfo::PPCJITInfo | ( | PPCTargetMachine & | tm | ) | [inline] |
void PPCJITInfo::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 155 of file PPCTargetMachine.cpp.
References llvm::FunctionPassManager::add(), llvm::createCFGSimplificationPass(), llvm::createLoopStrengthReducePass(), llvm::createLowerGCPass(), llvm::createLowerInvokePass(), llvm::createMachineFunctionPrinterPass(), llvm::createPPCBranchSelectionPass(), llvm::createPPCISelDag(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createUnreachableBlockEliminationPass(), llvm::PPCTargetMachine::getTargetLowering(), llvm::PrintMachineCode, llvm::TargetMachine::setRelocationModel(), llvm::Reloc::Static, and TM.
void * PPCJITInfo::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. Return the address of the resultant function.
Reimplemented from llvm::TargetJITInfo.
Definition at line 167 of file PPCJITInfo.cpp.
References EmitBranchToAt(), llvm::MachineCodeEmitter::emitWordBE(), llvm::MachineCodeEmitter::finishFunctionStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), MCE, PPC32CompilationCallback(), and llvm::MachineCodeEmitter::startFunctionStub().
TargetJITInfo::LazyResolverFn PPCJITInfo::getLazyResolverFunction | ( | JITCompilerFn | ) | [virtual] |
Definition at line 162 of file PPCJITInfo.cpp.
References JITCompilerFunction, and PPC32CompilationCallback().
void PPCJITInfo::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 195 of file PPCJITInfo.cpp.
References MR, llvm::PPC::reloc_absolute_high, llvm::PPC::reloc_absolute_low, llvm::PPC::reloc_absolute_low_ix, llvm::PPC::reloc_absolute_ptr_high, llvm::PPC::reloc_absolute_ptr_low, and llvm::PPC::reloc_pcrel_bx.
void PPCJITInfo::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 245 of file PPCJITInfo.cpp.
References EmitBranchToAt().
void PPCJITInfo::resolveBBRefs | ( | MachineCodeEmitter & | MCE | ) | [virtual] |
resolveBBRefs - Resolve branches to BasicBlocks for the JIT emitted function.
Reimplemented from llvm::TargetJITInfo.
Definition at line 249 of file PPCJITInfo.cpp.
References llvm::TargetJITInfo::BBRefs, DEBUG, llvm::MachineCodeEmitter::getMachineBasicBlockAddress(), MCE, Ref, and second.
void PPCJITInfo::synchronizeICache | ( | const void * | Addr, | |
size_t | Len | |||
) | [virtual] |
synchronizeICache - On some targets, the JIT emitted code must be explicitly refetched to ensure correct execution.
Reimplemented from llvm::TargetJITInfo.
Definition at line 276 of file PPCJITInfo.cpp.
PPCTargetMachine& llvm::PPCJITInfo::TM [protected] |