LLVM API Documentation

llvm::AlphaJITInfo Class Reference

#include <AlphaJITInfo.h>

Inheritance diagram for llvm::AlphaJITInfo:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AlphaJITInfo (TargetMachine &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)

Protected Attributes

TargetMachineTM

Detailed Description

Definition at line 25 of file AlphaJITInfo.h.


Constructor & Destructor Documentation

llvm::AlphaJITInfo::AlphaJITInfo ( TargetMachine tm  )  [inline]

Definition at line 29 of file AlphaJITInfo.h.

References llvm::TargetJITInfo::useGOT.


Member Function Documentation

void AlphaJITInfo::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 108 of file AlphaTargetMachine.cpp.

References llvm::FunctionPassManager::add(), llvm::createAlphaISelDag(), llvm::createCFGSimplificationPass(), llvm::createLoopStrengthReducePass(), llvm::createLowerGCPass(), llvm::createLowerInvokePass(), llvm::createMachineFunctionPrinterPass(), llvm::createPrologEpilogCodeInserter(), llvm::createRegisterAllocator(), llvm::createUnreachableBlockEliminationPass(), llvm::PrintMachineCode, and TM.

void * AlphaJITInfo::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 194 of file AlphaJITInfo.cpp.

References DEBUG, EmitBranchToAt(), llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishFunctionStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), MCE, and llvm::MachineCodeEmitter::startFunctionStub().

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

Definition at line 207 of file AlphaJITInfo.cpp.

References AlphaCompilationCallback(), and JITCompilerFunction.

void AlphaJITInfo::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 237 of file AlphaJITInfo.cpp.

References DEBUG, getLower16(), getUpper16(), MR, llvm::Alpha::reloc_bsr, llvm::Alpha::reloc_gpdist, llvm::Alpha::reloc_gprelhigh, llvm::Alpha::reloc_gprellow, and llvm::Alpha::reloc_literal.

void AlphaJITInfo::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 73 of file AlphaJITInfo.cpp.

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

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

Reimplemented from llvm::TargetJITInfo.

Definition at line 308 of file AlphaJITInfo.cpp.

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


Member Data Documentation

TargetMachine& llvm::AlphaJITInfo::TM [protected]

Definition at line 27 of file AlphaJITInfo.h.

Referenced by addPassesToJITCompile().


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