LLVM 19.0.0git
Classes | Public Member Functions | List of all members
llvm::MCJIT Class Reference

#include "ExecutionEngine/MCJIT/MCJIT.h"

Inheritance diagram for llvm::MCJIT:
Inheritance graph
[legend]

Public Member Functions

 ~MCJIT () override
 
ExecutionEngine interface implementation
void addModule (std::unique_ptr< Module > M) override
 Add a Module to the list of modules that we can JIT from.
 
void addObjectFile (std::unique_ptr< object::ObjectFile > O) override
 addObjectFile - Add an ObjectFile to the execution engine.
 
void addObjectFile (object::OwningBinary< object::ObjectFile > O) override
 
void addArchive (object::OwningBinary< object::Archive > O) override
 addArchive - Add an Archive to the execution engine.
 
bool removeModule (Module *M) override
 removeModule - Removes a Module from the list of modules, but does not free the module's memory.
 
FunctionFindFunctionNamed (StringRef FnName) override
 FindFunctionNamed - Search all of the active modules to find the function that defines FnName.
 
GlobalVariableFindGlobalVariableNamed (StringRef Name, bool AllowInternal=false) override
 FindGlobalVariableNamed - Search all of the active modules to find the global variable that defines Name.
 
void setObjectCache (ObjectCache *manager) override
 Sets the object manager that MCJIT should use to avoid compilation.
 
void setProcessAllSections (bool ProcessAllSections) override
 setProcessAllSections (MCJIT Only): By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded.
 
void generateCodeForModule (Module *M) override
 generateCodeForModule - Run code generation for the specified module and load it into memory.
 
void finalizeObject () override
 finalizeObject - ensure the module is fully processed and is usable.
 
virtual void finalizeModule (Module *)
 
void finalizeLoadedModules ()
 
void runStaticConstructorsDestructors (bool isDtors) override
 runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program.
 
void * getPointerToFunction (Function *F) override
 getPointerToFunction - The different EE's represent function bodies in different ways.
 
GenericValue runFunction (Function *F, ArrayRef< GenericValue > ArgValues) override
 runFunction - Execute the specified function with the specified arguments, and return the result.
 
void * getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true) override
 getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call.
 
void mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress) override
 mapSectionAddress - map a section to its target address space value.
 
void RegisterJITEventListener (JITEventListener *L) override
 Registers a listener to be called back on various events within the JIT.
 
void UnregisterJITEventListener (JITEventListener *L) override
 
uint64_t getGlobalValueAddress (const std::string &Name) override
 getGlobalValueAddress - Return the address of the specified global value.
 
uint64_t getFunctionAddress (const std::string &Name) override
 getFunctionAddress - Return the address of the specified function.
 
TargetMachinegetTargetMachine () override
 Return the target machine (if available).
 
- Public Member Functions inherited from llvm::ExecutionEngine
virtual ~ExecutionEngine ()
 
virtual void addModule (std::unique_ptr< Module > M)
 Add a Module to the list of modules that we can JIT from.
 
virtual void addObjectFile (std::unique_ptr< object::ObjectFile > O)
 addObjectFile - Add an ObjectFile to the execution engine.
 
virtual void addObjectFile (object::OwningBinary< object::ObjectFile > O)
 
virtual void addArchive (object::OwningBinary< object::Archive > A)
 addArchive - Add an Archive to the execution engine.
 
const DataLayoutgetDataLayout () const
 
virtual bool removeModule (Module *M)
 removeModule - Removes a Module from the list of modules, but does not free the module's memory.
 
virtual FunctionFindFunctionNamed (StringRef FnName)
 FindFunctionNamed - Search all of the active modules to find the function that defines FnName.
 
virtual GlobalVariableFindGlobalVariableNamed (StringRef Name, bool AllowInternal=false)
 FindGlobalVariableNamed - Search all of the active modules to find the global variable that defines Name.
 
virtual GenericValue runFunction (Function *F, ArrayRef< GenericValue > ArgValues)=0
 runFunction - Execute the specified function with the specified arguments, and return the result.
 
virtual void * getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true)=0
 getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call.
 
virtual void mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress)
 mapSectionAddress - map a section to its target address space value.
 
virtual void generateCodeForModule (Module *M)
 generateCodeForModule - Run code generation for the specified module and load it into memory.
 
virtual void finalizeObject ()
 finalizeObject - ensure the module is fully processed and is usable.
 
bool hasError () const
 Returns true if an error has been recorded.
 
void clearErrorMessage ()
 Clear the error message.
 
const std::string & getErrorMessage () const
 Returns the most recent error message.
 
virtual void runStaticConstructorsDestructors (bool isDtors)
 runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program.
 
void runStaticConstructorsDestructors (Module &module, bool isDtors)
 This method is used to execute all of the static constructors or destructors for a particular module.
 
int runFunctionAsMain (Function *Fn, const std::vector< std::string > &argv, const char *const *envp)
 runFunctionAsMain - This is a helper function which wraps runFunction to handle the common task of starting up main with the specified argc, argv, and envp parameters.
 
void addGlobalMapping (const GlobalValue *GV, void *Addr)
 addGlobalMapping - Tell the execution engine that the specified global is at the specified location.
 
void addGlobalMapping (StringRef Name, uint64_t Addr)
 
void clearAllGlobalMappings ()
 clearAllGlobalMappings - Clear all global mappings and start over again, for use in dynamic compilation scenarios to move globals.
 
void clearGlobalMappingsFromModule (Module *M)
 clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT.
 
uint64_t updateGlobalMapping (const GlobalValue *GV, void *Addr)
 updateGlobalMapping - Replace an existing mapping for GV with a new address.
 
uint64_t updateGlobalMapping (StringRef Name, uint64_t Addr)
 
uint64_t getAddressToGlobalIfAvailable (StringRef S)
 getAddressToGlobalIfAvailable - This returns the address of the specified global symbol.
 
void * getPointerToGlobalIfAvailable (StringRef S)
 getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is has already been codegen'd, otherwise it returns null.
 
void * getPointerToGlobalIfAvailable (const GlobalValue *GV)
 
void * getPointerToGlobal (const GlobalValue *GV)
 getPointerToGlobal - This returns the address of the specified global value.
 
virtual void * getPointerToFunction (Function *F)=0
 getPointerToFunction - The different EE's represent function bodies in different ways.
 
virtual void * getPointerToFunctionOrStub (Function *F)
 getPointerToFunctionOrStub - If the specified function has been code-gen'd, return a pointer to the function.
 
virtual uint64_t getGlobalValueAddress (const std::string &Name)
 getGlobalValueAddress - Return the address of the specified global value.
 
virtual uint64_t getFunctionAddress (const std::string &Name)
 getFunctionAddress - Return the address of the specified function.
 
const GlobalValuegetGlobalValueAtAddress (void *Addr)
 getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address.
 
void StoreValueToMemory (const GenericValue &Val, GenericValue *Ptr, Type *Ty)
 StoreValueToMemory - Stores the data in Val of type Ty at address Ptr.
 
void InitializeMemory (const Constant *Init, void *Addr)
 
virtual void * getOrEmitGlobalVariable (const GlobalVariable *GV)
 getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed.
 
virtual void RegisterJITEventListener (JITEventListener *)
 Registers a listener to be called back on various events within the JIT.
 
virtual void UnregisterJITEventListener (JITEventListener *)
 
virtual void setObjectCache (ObjectCache *)
 Sets the pre-compiled object cache.
 
virtual void setProcessAllSections (bool ProcessAllSections)
 setProcessAllSections (MCJIT Only): By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded.
 
virtual TargetMachinegetTargetMachine ()
 Return the target machine (if available).
 
void DisableLazyCompilation (bool Disabled=true)
 DisableLazyCompilation - When lazy compilation is off (the default), the JIT will eagerly compile every function reachable from the argument to getPointerToFunction.
 
bool isCompilingLazily () const
 
void DisableGVCompilation (bool Disabled=true)
 DisableGVCompilation - If called, the JIT will abort if it's asked to allocate space and populate a GlobalVariable that is not internal to the module.
 
bool isGVCompilationDisabled () const
 
void DisableSymbolSearching (bool Disabled=true)
 DisableSymbolSearching - If called, the JIT will not try to lookup unknown symbols with dlsym.
 
bool isSymbolSearchingDisabled () const
 
void setVerifyModules (bool Verify)
 Enable/Disable IR module verification.
 
bool getVerifyModules () const
 
void InstallLazyFunctionCreator (FunctionCreator C)
 InstallLazyFunctionCreator - If an unknown function is needed, the specified function pointer is invoked to create it.
 

(Private) Registration Interfaces

JITSymbol findSymbol (const std::string &Name, bool CheckFunctionsOnly)
 
uint64_t getSymbolAddress (const std::string &Name, bool CheckFunctionsOnly)
 
static void Register ()
 
static ExecutionEnginecreateJIT (std::unique_ptr< Module > M, std::string *ErrorStr, std::shared_ptr< MCJITMemoryManager > MemMgr, std::shared_ptr< LegacyJITSymbolResolver > Resolver, std::unique_ptr< TargetMachine > TM)
 
std::unique_ptr< MemoryBufferemitObject (Module *M)
 emitObject – Generate a JITed object in memory from the specified module Currently, MCJIT only supports a single module and the module passed to this function call is expected to be the contained module.
 
void notifyObjectLoaded (const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &L)
 
void notifyFreeingObject (const object::ObjectFile &Obj)
 
JITSymbol findExistingSymbol (const std::string &Name)
 
ModulefindModuleForSymbol (const std::string &Name, bool CheckFunctionsOnly)
 

Additional Inherited Members

- Public Attributes inherited from llvm::ExecutionEngine
sys::Mutex lock
 lock - This lock protects the ExecutionEngine and MCJIT classes.
 
- Protected Member Functions inherited from llvm::ExecutionEngine
virtual chargetMemoryForGV (const GlobalVariable *GV)
 getMemoryforGV - Allocate memory for a global variable.
 
std::string getMangledName (const GlobalValue *GV)
 getMangledName - Get mangled name.
 
 ExecutionEngine (DataLayout DL)
 
 ExecutionEngine (DataLayout DL, std::unique_ptr< Module > M)
 
 ExecutionEngine (std::unique_ptr< Module > M)
 
void emitGlobals ()
 EmitGlobals - Emit all of the global variables to memory, storing their addresses into GlobalAddress.
 
void emitGlobalVariable (const GlobalVariable *GV)
 
GenericValue getConstantValue (const Constant *C)
 Converts a Constant* into a GenericValue, including handling of ConstantExpr values.
 
void LoadValueFromMemory (GenericValue &Result, GenericValue *Ptr, Type *Ty)
 FIXME: document.
 
- Protected Attributes inherited from llvm::ExecutionEngine
SmallVector< std::unique_ptr< Module >, 1 > Modules
 The list of Modules that we are JIT'ing from.
 
FunctionCreator LazyFunctionCreator
 LazyFunctionCreator - If an unknown function is needed, this function pointer is invoked to create it.
 
std::string ErrMsg
 
- Static Protected Attributes inherited from llvm::ExecutionEngine
static ExecutionEngine *(* MCJITCtor )(std::unique_ptr< Module > M, std::string *ErrorStr, std::shared_ptr< MCJITMemoryManager > MM, std::shared_ptr< LegacyJITSymbolResolver > SR, std::unique_ptr< TargetMachine > TM) = nullptr
 
static ExecutionEngine *(* InterpCtor )(std::unique_ptr< Module > M, std::string *ErrorStr) =nullptr
 

Detailed Description

Definition at line 66 of file MCJIT.h.

Constructor & Destructor Documentation

◆ ~MCJIT()

MCJIT::~MCJIT ( )
override

Member Function Documentation

◆ addArchive()

void MCJIT::addArchive ( object::OwningBinary< object::Archive A)
overridevirtual

addArchive - Add an Archive to the execution engine.

This method is only supported by MCJIT. MCJIT will use the archive to resolve external symbols in objects it is loading. If a symbol is found in the Archive the contained object file will be extracted (in memory) and loaded for possible execution.

Reimplemented from llvm::ExecutionEngine.

Definition at line 137 of file MCJIT.cpp.

References A.

◆ addModule()

void MCJIT::addModule ( std::unique_ptr< Module M)
overridevirtual

Add a Module to the list of modules that we can JIT from.

Reimplemented from llvm::ExecutionEngine.

Definition at line 105 of file MCJIT.cpp.

References llvm::ExecutionEngine::getDataLayout(), and llvm::ExecutionEngine::lock.

◆ addObjectFile() [1/2]

void MCJIT::addObjectFile ( object::OwningBinary< object::ObjectFile O)
overridevirtual

Reimplemented from llvm::ExecutionEngine.

Definition at line 129 of file MCJIT.cpp.

References addObjectFile(), and llvm::object::OwningBinary< T >::takeBinary().

◆ addObjectFile() [2/2]

void MCJIT::addObjectFile ( std::unique_ptr< object::ObjectFile O)
overridevirtual

addObjectFile - Add an ObjectFile to the execution engine.

This method is only supported by MCJIT. MCJIT will immediately load the object into memory and adds its symbols to the list used to resolve external symbols while preparing other objects for execution.

Objects added using this function will not be made executable until needed by another object.

MCJIT will take ownership of the ObjectFile.

Reimplemented from llvm::ExecutionEngine.

Definition at line 119 of file MCJIT.cpp.

References llvm::RuntimeDyld::getErrorString(), llvm::RuntimeDyld::hasError(), llvm::RuntimeDyld::loadObject(), notifyObjectLoaded(), and llvm::report_fatal_error().

Referenced by addObjectFile(), and findSymbol().

◆ createJIT()

ExecutionEngine * MCJIT::createJIT ( std::unique_ptr< Module M,
std::string *  ErrorStr,
std::shared_ptr< MCJITMemoryManager MemMgr,
std::shared_ptr< LegacyJITSymbolResolver Resolver,
std::unique_ptr< TargetMachine TM 
)
static

Definition at line 45 of file MCJIT.cpp.

References llvm::sys::DynamicLibrary::LoadLibraryPermanently(), and TM.

Referenced by Register().

◆ emitObject()

std::unique_ptr< MemoryBuffer > MCJIT::emitObject ( Module M)
protected

emitObject – Generate a JITed object in memory from the specified module Currently, MCJIT only supports a single module and the module passed to this function call is expected to be the contained module.

The module is passed as a parameter here to prepare for multiple module support in the future.

Definition at line 146 of file MCJIT.cpp.

References assert(), llvm::cantFail(), llvm::ExecutionEngine::getVerifyModules(), llvm::ExecutionEngine::lock, llvm::ObjectCache::notifyObjectCompiled(), llvm::report_fatal_error(), llvm::legacy::PassManager::run(), and TM.

Referenced by generateCodeForModule().

◆ finalizeLoadedModules()

void MCJIT::finalizeLoadedModules ( )

◆ finalizeModule()

void MCJIT::finalizeModule ( Module M)
virtual

◆ finalizeObject()

void MCJIT::finalizeObject ( )
overridevirtual

finalizeObject - ensure the module is fully processed and is usable.

It is the user-level function for completing the process of making the object usable for execution. It should be called after sections within an object have been relocated using mapSectionAddress. When this method is called the MCJIT execution engine will reapply relocations for a loaded object. Is it OK to finalize a set of modules, add modules and finalize again.

Reimplemented from llvm::ExecutionEngine.

Definition at line 258 of file MCJIT.cpp.

References finalizeLoadedModules(), generateCodeForModule(), llvm::ExecutionEngine::lock, and llvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ findExistingSymbol()

JITSymbol MCJIT::findExistingSymbol ( const std::string &  Name)
protected

◆ FindFunctionNamed()

Function * MCJIT::FindFunctionNamed ( StringRef  FnName)
overridevirtual

FindFunctionNamed - Search all of the active modules to find the function that defines FnName.

This is very slow operation and shouldn't be used for general code.

Reimplemented from llvm::ExecutionEngine.

Definition at line 489 of file MCJIT.cpp.

References F.

◆ FindGlobalVariableNamed()

GlobalVariable * MCJIT::FindGlobalVariableNamed ( StringRef  Name,
bool  AllowInternal = false 
)
overridevirtual

FindGlobalVariableNamed - Search all of the active modules to find the global variable that defines Name.

This is very slow operation and shouldn't be used for general code.

Reimplemented from llvm::ExecutionEngine.

Definition at line 501 of file MCJIT.cpp.

References Name.

◆ findModuleForSymbol()

Module * MCJIT::findModuleForSymbol ( const std::string &  Name,
bool  CheckFunctionsOnly 
)
protected

◆ findSymbol()

JITSymbol MCJIT::findSymbol ( const std::string &  Name,
bool  CheckFunctionsOnly 
)

◆ generateCodeForModule()

void MCJIT::generateCodeForModule ( Module M)
overridevirtual

generateCodeForModule - Run code generation for the specified module and load it into memory.

When this function has completed, all code and data for the specified module, and any module on which this module depends, will be generated and loaded into memory, but relocations will not yet have been applied and all memory will be readable and writable but not executable.

This function is primarily useful when generating code for an external target, allowing the client an opportunity to remap section addresses before relocations are applied. Clients that intend to execute code locally can use the getFunctionAddress call, which will generate code and apply final preparations all in one step.

This method has no effect for the interpreter.

Reimplemented from llvm::ExecutionEngine.

Definition at line 189 of file MCJIT.cpp.

References assert(), llvm::object::ObjectFile::createObjectFile(), emitObject(), llvm::Expected< T >::get(), llvm::ExecutionEngine::getDataLayout(), llvm::RuntimeDyld::getErrorString(), llvm::ObjectCache::getObject(), llvm::RuntimeDyld::hasError(), llvm::RuntimeDyld::loadObject(), llvm::ExecutionEngine::lock, llvm::logAllUnhandledErrors(), notifyObjectLoaded(), OS, llvm::report_fatal_error(), and llvm::Expected< T >::takeError().

Referenced by finalizeModule(), finalizeObject(), findSymbol(), and getPointerToFunction().

◆ getFunctionAddress()

uint64_t MCJIT::getFunctionAddress ( const std::string &  Name)
overridevirtual

getFunctionAddress - Return the address of the specified function.

This may involve code generation.

Reimplemented from llvm::ExecutionEngine.

Definition at line 404 of file MCJIT.cpp.

References finalizeLoadedModules(), getSymbolAddress(), llvm::ExecutionEngine::lock, and Name.

◆ getGlobalValueAddress()

uint64_t MCJIT::getGlobalValueAddress ( const std::string &  Name)
overridevirtual

getGlobalValueAddress - Return the address of the specified global value.

This may involve code generation.

This function should not be called with the interpreter engine.

Reimplemented from llvm::ExecutionEngine.

Definition at line 396 of file MCJIT.cpp.

References finalizeLoadedModules(), getSymbolAddress(), llvm::ExecutionEngine::lock, and Name.

◆ getPointerToFunction()

void * MCJIT::getPointerToFunction ( Function F)
overridevirtual

getPointerToFunction - The different EE's represent function bodies in different ways.

They should each implement this to say what a function pointer should look like. When F is destroyed, the ExecutionEngine will remove its global mapping and free any machine code. Be sure no threads are running inside F when that happens.

This function is deprecated for the MCJIT execution engine. Use getFunctionAddress instead.

Implements llvm::ExecutionEngine.

Definition at line 413 of file MCJIT.cpp.

References Addr, F, generateCodeForModule(), llvm::JITEvaluatedSymbol::getAddress(), getPointerToNamedFunction(), llvm::RuntimeDyld::getSymbol(), llvm::ExecutionEngine::lock, Name, TM, and llvm::ExecutionEngine::updateGlobalMapping().

Referenced by runFunction().

◆ getPointerToNamedFunction()

void * MCJIT::getPointerToNamedFunction ( StringRef  Name,
bool  AbortOnFailure = true 
)
overridevirtual

getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call.

As such it is only useful for resolving library symbols, not code generated symbols.

If AbortOnFailure is false and no function with the given name is found, this function silently returns a null pointer. Otherwise, it prints a message to stderr and aborts.

If a LazyFunctionCreator is installed, use it to get/create the function.

Implements llvm::ExecutionEngine.

Definition at line 616 of file MCJIT.cpp.

References llvm::ExecutionEngine::isSymbolSearchingDisabled(), llvm::ExecutionEngine::LazyFunctionCreator, Name, llvm::report_fatal_error(), and Sym.

Referenced by getPointerToFunction().

◆ getSymbolAddress()

uint64_t MCJIT::getSymbolAddress ( const std::string &  Name,
bool  CheckFunctionsOnly 
)

◆ getTargetMachine()

TargetMachine * llvm::MCJIT::getTargetMachine ( )
inlineoverridevirtual

Return the target machine (if available).

Reimplemented from llvm::ExecutionEngine.

Definition at line 285 of file MCJIT.h.

References TM.

◆ mapSectionAddress()

void llvm::MCJIT::mapSectionAddress ( const void *  LocalAddress,
uint64_t  TargetAddress 
)
inlineoverridevirtual

mapSectionAddress - map a section to its target address space value.

Map the address of a JIT section as returned from the memory manager to the address in the target process as the running code will see it. This is the address which will be used for relocation resolution.

Reimplemented from llvm::ExecutionEngine.

Definition at line 272 of file MCJIT.h.

References llvm::RuntimeDyld::mapSectionAddress().

◆ notifyFreeingObject()

void MCJIT::notifyFreeingObject ( const object::ObjectFile Obj)
protected

Definition at line 666 of file MCJIT.cpp.

References llvm::StringRef::data(), llvm::object::Binary::getData(), and llvm::ExecutionEngine::lock.

Referenced by ~MCJIT().

◆ notifyObjectLoaded()

void MCJIT::notifyObjectLoaded ( const object::ObjectFile Obj,
const RuntimeDyld::LoadedObjectInfo L 
)
protected

◆ Register()

static void llvm::MCJIT::Register ( )
inlinestatic

Definition at line 291 of file MCJIT.h.

References createJIT(), and llvm::ExecutionEngine::MCJITCtor.

◆ RegisterJITEventListener()

void MCJIT::RegisterJITEventListener ( JITEventListener )
overridevirtual

Registers a listener to be called back on various events within the JIT.

See JITEventListener.h for more details. Does not take ownership of the argument. The argument may be NULL, in which case these functions do nothing.

Reimplemented from llvm::ExecutionEngine.

Definition at line 638 of file MCJIT.cpp.

References llvm::ExecutionEngine::lock.

◆ removeModule()

bool MCJIT::removeModule ( Module M)
overridevirtual

removeModule - Removes a Module from the list of modules, but does not free the module's memory.

Returns true if M is found, in which case the caller assumes responsibility for deleting the module.

Reimplemented from llvm::ExecutionEngine.

Definition at line 114 of file MCJIT.cpp.

References llvm::ExecutionEngine::lock.

◆ runFunction()

GenericValue MCJIT::runFunction ( Function F,
ArrayRef< GenericValue ArgValues 
)
overridevirtual

runFunction - Execute the specified function with the specified arguments, and return the result.

For MCJIT execution engines, clients are encouraged to use the "GetFunctionAddress" method (rather than runFunction) and cast the returned uint64_t to the desired function pointer type. However, for backwards compatibility MCJIT's implementation can execute 'main-like' function (i.e. those returning void or int, and taking either no arguments or (int, char*[])).

Implements llvm::ExecutionEngine.

Definition at line 513 of file MCJIT.cpp.

References assert(), llvm::BitWidth, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::ArrayRef< T >::empty(), F, finalizeModule(), llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::Type::FP128TyID, llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), getPointerToFunction(), llvm::FunctionType::getReturnType(), llvm::GVTOP(), llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::FunctionType::isVarArg(), llvm_unreachable, llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::PTOGV(), llvm::report_fatal_error(), RetTy, llvm::ArrayRef< T >::size(), llvm::Type::VoidTyID, and llvm::Type::X86_FP80TyID.

◆ runStaticConstructorsDestructors()

void MCJIT::runStaticConstructorsDestructors ( bool  isDtors)
overridevirtual

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program.

Parameters
isDtors- Run the destructors instead of constructors.

Reimplemented from llvm::ExecutionEngine.

Definition at line 455 of file MCJIT.cpp.

◆ setObjectCache()

void MCJIT::setObjectCache ( ObjectCache manager)
overridevirtual

Sets the object manager that MCJIT should use to avoid compilation.

Reimplemented from llvm::ExecutionEngine.

Definition at line 141 of file MCJIT.cpp.

References llvm::ExecutionEngine::lock.

◆ setProcessAllSections()

void llvm::MCJIT::setProcessAllSections ( bool  ProcessAllSections)
inlineoverridevirtual

setProcessAllSections (MCJIT Only): By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded.

Passing 'true' to this method will cause RuntimeDyld to pass all sections to its RTDyldMemoryManager regardless of whether they are "required to execute" in the usual sense.

Rationale: Some MCJIT clients want to be able to inspect metadata sections (e.g. Dwarf, Stack-maps) to enable functionality or analyze performance. Passing these sections to the memory manager allows the client to make policy about the relevant sections, rather than having MCJIT do it.

Reimplemented from llvm::ExecutionEngine.

Definition at line 227 of file MCJIT.h.

References llvm::RuntimeDyld::setProcessAllSections().

◆ UnregisterJITEventListener()

void MCJIT::UnregisterJITEventListener ( JITEventListener L)
overridevirtual

Reimplemented from llvm::ExecutionEngine.

Definition at line 645 of file MCJIT.cpp.

References llvm::find(), I, llvm::ExecutionEngine::lock, llvm::reverse(), and std::swap().


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