LLVM API Documentation

Public Member Functions
llvm::ARMJITInfo Class Reference

#include <ARMJITInfo.h>

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

List of all members.

Public Member Functions

 ARMJITInfo ()
virtual void replaceMachineCodeForFunction (void *Old, void *New)
virtual void * emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, JITCodeEmitter &JCE)
virtual StubLayout getStubLayout ()
 Returns the maximum size and alignment for a call stub on this target.
virtual void * emitFunctionStub (const Function *F, void *Fn, JITCodeEmitter &JCE)
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 bool hasCustomConstantPool () const
virtual bool hasCustomJumpTables () const
virtual bool allocateSeparateGVMemory () const
void Initialize (const MachineFunction &MF, bool isPIC)
intptr_t getConstantPoolEntryAddr (unsigned CPI) const
void addConstantPoolEntryAddr (unsigned CPI, intptr_t Addr)
intptr_t getJumpTableBaseAddr (unsigned JTI) const
void addJumpTableBaseAddr (unsigned JTI, intptr_t Addr)
intptr_t getPCLabelAddr (unsigned Id) const
void addPCLabelAddr (unsigned Id, intptr_t Addr)
 addPCLabelAddr - Remember the address of the specified PC label.
intptr_t getIndirectSymAddr (void *Addr) const
void addIndirectSymAddr (void *SymAddr, intptr_t IndSymAddr)

Detailed Description

Definition at line 28 of file ARMJITInfo.h.


Constructor & Destructor Documentation

llvm::ARMJITInfo::ARMJITInfo ( ) [inline, explicit]

Definition at line 49 of file ARMJITInfo.h.

References llvm::TargetJITInfo::useGOT.


Member Function Documentation

void llvm::ARMJITInfo::addConstantPoolEntryAddr ( unsigned  CPI,
intptr_t  Addr 
) [inline]

addConstantPoolEntryAddr - Map a Constant Pool Index to the address where its associated value is stored. When relocations are processed, this value will be used to resolve references to the constant.

Definition at line 124 of file ARMJITInfo.h.

References llvm::SmallVectorTemplateCommon< T, typename >::size().

void llvm::ARMJITInfo::addIndirectSymAddr ( void *  SymAddr,
intptr_t  IndSymAddr 
) [inline]

addIndirectSymAddr - Add a mapping from address of an emitted symbol to its indirect symbol address.

Definition at line 171 of file ARMJITInfo.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::insert().

Referenced by emitGlobalValueIndirectSym().

void llvm::ARMJITInfo::addJumpTableBaseAddr ( unsigned  JTI,
intptr_t  Addr 
) [inline]

addJumpTableBaseAddr - Map a jump table index to the address where the corresponding inline jump table is emitted. When relocations are processed, this value will be used to resolve references to the jump table.

Definition at line 141 of file ARMJITInfo.h.

References llvm::SmallVectorTemplateCommon< T, typename >::size().

void llvm::ARMJITInfo::addPCLabelAddr ( unsigned  Id,
intptr_t  Addr 
) [inline]

addPCLabelAddr - Remember the address of the specified PC label.

Definition at line 155 of file ARMJITInfo.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::insert().

virtual bool llvm::ARMJITInfo::allocateSeparateGVMemory ( ) const [inline, virtual]

allocateSeparateGVMemory - If true, globals should be placed in separately allocated heap memory rather than in the same code memory allocated by JITCodeEmitter.

Reimplemented from llvm::TargetJITInfo.

Definition at line 94 of file ARMJITInfo.h.

void * ARMJITInfo::emitFunctionStub ( const Function F,
void *  Fn,
JITCodeEmitter JCE 
) [virtual]
void * ARMJITInfo::emitGlobalValueIndirectSym ( const GlobalValue GV,
void *  ptr,
JITCodeEmitter JCE 
) [virtual]

emitGlobalValueIndirectSym - Use the specified JITCodeEmitter object to emit an indirect symbol which contains the address of the specified ptr.

Reimplemented from llvm::TargetJITInfo.

Definition at line 141 of file ARMJITInfo.cpp.

References addIndirectSymAddr(), llvm::JITCodeEmitter::allocIndirectGV(), and llvm::MachineCodeEmitter::emitWordLEInto().

Referenced by emitFunctionStub().

intptr_t llvm::ARMJITInfo::getConstantPoolEntryAddr ( unsigned  CPI) const [inline]

getConstantPoolEntryAddr - The ARM target puts all constant pool entries into constant islands. This returns the address of the constant pool entry of the specified index.

Definition at line 116 of file ARMJITInfo.h.

References llvm::SmallVectorTemplateCommon< T, typename >::size().

intptr_t llvm::ARMJITInfo::getIndirectSymAddr ( void *  Addr) const [inline]

getIndirectSymAddr - Retrieve the address of the indirect symbol of the specified symbol located at address. Returns 0 if the indirect symbol has not been emitted.

Definition at line 162 of file ARMJITInfo.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and llvm::ARM_PROC::I.

Referenced by emitFunctionStub().

intptr_t llvm::ARMJITInfo::getJumpTableBaseAddr ( unsigned  JTI) const [inline]

getJumpTableBaseAddr - The ARM target inline all jump tables within text section of the function. This returns the address of the base of the jump table of the specified index.

Definition at line 132 of file ARMJITInfo.h.

References llvm::SmallVectorTemplateCommon< T, typename >::size().

TargetJITInfo::LazyResolverFn ARMJITInfo::getLazyResolverFunction ( JITCompilerFn  F) [virtual]

getLazyResolverFunction - Expose the lazy resolver to the JIT.

Reimplemented from llvm::TargetJITInfo.

Definition at line 136 of file ARMJITInfo.cpp.

References ARMCompilationCallback(), F(), and JITCompilerFunction.

intptr_t llvm::ARMJITInfo::getPCLabelAddr ( unsigned  Id) const [inline]

getPCLabelAddr - Retrieve the address of the PC label of the specified id.

Definition at line 148 of file ARMJITInfo.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and llvm::ARM_PROC::I.

TargetJITInfo::StubLayout ARMJITInfo::getStubLayout ( ) [virtual]

Returns the maximum size and alignment for a call stub on this target.

Reimplemented from llvm::TargetJITInfo.

Definition at line 152 of file ARMJITInfo.cpp.

virtual bool llvm::ARMJITInfo::hasCustomConstantPool ( ) const [inline, virtual]

hasCustomConstantPool - Allows a target to specify that constant pool address resolution is handled by the target.

Reimplemented from llvm::TargetJITInfo.

Definition at line 85 of file ARMJITInfo.h.

virtual bool llvm::ARMJITInfo::hasCustomJumpTables ( ) const [inline, virtual]

hasCustomJumpTables - Allows a target to specify that jumptables are emitted by the target.

Reimplemented from llvm::TargetJITInfo.

Definition at line 89 of file ARMJITInfo.h.

void llvm::ARMJITInfo::Initialize ( const MachineFunction MF,
bool  isPIC 
) [inline]

Initialize - Initialize internal stage for the function being JITted. Resize constant pool ids to CONSTPOOL_ENTRY addresses map; resize jump table ids to jump table bases map; remember if codegen relocation model is PIC.

Definition at line 106 of file ARMJITInfo.h.

References llvm::MachineFunction::getInfo(), llvm::ARMFunctionInfo::getNumJumpTables(), llvm::ARMFunctionInfo::getNumPICLabels(), and llvm::SmallVectorImpl< T >::resize().

void ARMJITInfo::relocate ( void *  Function,
MachineRelocation MR,
unsigned  NumRelocs,
unsigned char *  GOTBase 
) [virtual]
void ARMJITInfo::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 29 of file ARMJITInfo.cpp.

References llvm::report_fatal_error().


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