LLVM API Documentation

llvm::PPCJITInfo Class Reference

#include <PPCJITInfo.h>

Inheritance diagram for llvm::PPCJITInfo:

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

Collaboration graph
[legend]
List of all members.

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)

Protected Attributes

PPCTargetMachineTM

Detailed Description

Definition at line 22 of file PPCJITInfo.h.


Constructor & Destructor Documentation

llvm::PPCJITInfo::PPCJITInfo ( PPCTargetMachine tm  )  [inline]

Definition at line 26 of file PPCJITInfo.h.

References llvm::TargetJITInfo::useGOT.


Member Function Documentation

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 131 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::Reloc::DynamicNoPIC, llvm::PPCTargetMachine::getTargetLowering(), llvm::PrintMachineCode, llvm::TargetMachine::setRelocationModel(), 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 162 of file PPCJITInfo.cpp.

References EmitBranchToAt(), llvm::MachineCodeEmitter::emitWord(), llvm::MachineCodeEmitter::finishFunctionStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), MCE, PPC32CompilationCallback(), and llvm::MachineCodeEmitter::startFunctionStub().

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

Definition at line 157 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 190 of file PPCJITInfo.cpp.

References MR, llvm::PPC::reloc_absolute_high, llvm::PPC::reloc_absolute_low, 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 241 of file PPCJITInfo.cpp.

References EmitBranchToAt().


Member Data Documentation

PPCTargetMachine& llvm::PPCJITInfo::TM [protected]

Definition at line 24 of file PPCJITInfo.h.

Referenced by addPassesToJITCompile().


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