LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::X86JITInfo Class Reference

#include <X86JITInfo.h>

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

Public Member Functions

 X86JITInfo (X86TargetMachine &tm)
 
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. More...
 
virtual void * emitFunctionStub (const Function *F, void *Target, JITCodeEmitter &JCE)
 
virtual uintptr_t getPICJumpTableEntry (uintptr_t BB, uintptr_t JTBase)
 
virtual LazyResolverFn getLazyResolverFunction (JITCompilerFn)
 getLazyResolverFunction - Expose the lazy resolver to the JIT. More...
 
virtual void relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase)
 
virtual char * allocateThreadLocalMemory (size_t size)
 
void setPICBase (uintptr_t Base)
 
uintptr_t getPICBase () const
 
- Public Member Functions inherited from llvm::TargetJITInfo
virtual ~TargetJITInfo ()
 
bool needsGOT () const
 
virtual bool hasCustomConstantPool () const
 
virtual bool hasCustomJumpTables () const
 
virtual bool allocateSeparateGVMemory () const
 

Additional Inherited Members

- Public Types inherited from llvm::TargetJITInfo
typedef void(* LazyResolverFn )()
 
typedef void *(* JITCompilerFn )(void *)
 
- Protected Attributes inherited from llvm::TargetJITInfo
bool useGOT
 

Detailed Description

Definition at line 25 of file X86JITInfo.h.

Constructor & Destructor Documentation

X86JITInfo::X86JITInfo ( X86TargetMachine tm)
explicit

Member Function Documentation

char * X86JITInfo::allocateThreadLocalMemory ( size_t  size)
virtual

allocateThreadLocalMemory - Each target has its own way of handling thread local variables. This method returns a value only meaningful to the target.

Reimplemented from llvm::TargetJITInfo.

Definition at line 575 of file X86JITInfo.cpp.

References llvm_unreachable.

void * X86JITInfo::emitFunctionStub ( const Function F,
void *  Target,
JITCodeEmitter JCE 
)
virtual

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

Reimplemented from llvm::TargetJITInfo.

Definition at line 471 of file X86JITInfo.cpp.

References llvm::JITCodeEmitter::emitAlignment(), llvm::JITCodeEmitter::emitByte(), llvm::JITCodeEmitter::emitWordLE(), llvm::JITCodeEmitter::getCurrentPCValue(), and X86CompilationCallback().

void * X86JITInfo::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 443 of file X86JITInfo.cpp.

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

TargetJITInfo::LazyResolverFn X86JITInfo::getLazyResolverFunction ( JITCompilerFn  F)
virtual

getLazyResolverFunction - Expose the lazy resolver to the JIT.

Reimplemented from llvm::TargetJITInfo.

Definition at line 424 of file X86JITInfo.cpp.

References F(), llvm::X86Subtarget::hasSSE1(), JITCompilerFunction, TsanIgnoreWritesBegin, TsanIgnoreWritesEnd, and X86CompilationCallback().

uintptr_t llvm::X86JITInfo::getPICBase ( ) const
inline

Definition at line 77 of file X86JITInfo.h.

uintptr_t X86JITInfo::getPICJumpTableEntry ( uintptr_t  BB,
uintptr_t  Entry 
)
virtual

getPICJumpTableEntry - Returns the value of the jumptable entry for the specific basic block.

Reimplemented from llvm::TargetJITInfo.

Definition at line 522 of file X86JITInfo.cpp.

TargetJITInfo::StubLayout X86JITInfo::getStubLayout ( )
virtual

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

Reimplemented from llvm::TargetJITInfo.

Definition at line 460 of file X86JITInfo.cpp.

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 542 of file X86JITInfo.cpp.

References llvm::MachineRelocation::getConstantVal(), llvm::MachineRelocation::getMachineCodeOffset(), llvm::MachineRelocation::getRelocationType(), llvm::MachineRelocation::getResultPointer(), llvm::X86::reloc_absolute_dword, llvm::X86::reloc_absolute_word, llvm::X86::reloc_absolute_word_sext, llvm::X86::reloc_pcrel_word, and llvm::X86::reloc_picrel_word.

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 34 of file X86JITInfo.cpp.

References llvm::sys::ValgrindDiscardTranslations().

void llvm::X86JITInfo::setPICBase ( uintptr_t  Base)
inline

setPICBase / getPICBase - Getter / setter of PICBase, used to compute PIC jumptable entry.

Definition at line 76 of file X86JITInfo.h.


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