ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
etiss::LLVMJIT Class Reference

#include <LLVMJIT.h>

Inheritance diagram for etiss::LLVMJIT:
Inheritance graph
[legend]
Collaboration diagram for etiss::LLVMJIT:
Collaboration graph
[legend]

Public Member Functions

 LLVMJIT ()
 
virtual ~LLVMJIT ()
 
virtual void * translate (std::string code, std::set< std::string > headerpaths, std::set< std::string > librarypaths, std::set< std::string > libraries, std::string &error, bool debug=false)
 translate C code to executable code and return a handle/pointer that identifies the compilation result
 
virtual void * getFunction (void *handle, std::string name, std::string &error)
 returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate
 
virtual void free (void *handle)
 clean up handled returned by etiss::JIT::translate
 
- Public Member Functions inherited from etiss::JIT
 JIT (std::string name)
 
virtual ~JIT ()
 
std::string getName ()
 returns the JIT instance name previously passed to the constructor
 

Private Attributes

std::unique_ptr< OrcJitorcJit_
 
std::unordered_set< std::string > loadedLibs_
 

Detailed Description

Definition at line 19 of file LLVMJIT.h.

Constructor & Destructor Documentation

◆ LLVMJIT()

LLVMJIT::LLVMJIT ( )

Definition at line 117 of file LLVMJIT.cpp.

References OrcJit::Create(), etiss_jit_llvm_init_done_, etiss_jit_llvm_init_mu_, and orcJit_.

Here is the call graph for this function:

◆ ~LLVMJIT()

LLVMJIT::~LLVMJIT ( )
virtual

Definition at line 134 of file LLVMJIT.cpp.

Member Function Documentation

◆ free()

void LLVMJIT::free ( void *  handle)
virtual

clean up handled returned by etiss::JIT::translate

Implements etiss::JIT.

Definition at line 213 of file LLVMJIT.cpp.

◆ getFunction()

void * LLVMJIT::getFunction ( void *  handle,
std::string  name,
std::string &  error 
)
virtual

returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate

Implements etiss::JIT.

Definition at line 215 of file LLVMJIT.cpp.

References compat::get_function_ptr(), and orcJit_.

Here is the call graph for this function:

◆ translate()

void * LLVMJIT::translate ( std::string  code,
std::set< std::string >  headerpaths,
std::set< std::string >  librarypaths,
std::set< std::string >  libraries,
std::string &  error,
bool  debug = false 
)
virtual

translate C code to executable code and return a handle/pointer that identifies the compilation result

Parameters
codegenerated code
headerpathspaths where required header files are located
librarypathspaths where required libraries are located (usually not needed since libraries don't require full linking)
librariesfile names of required libraries (usually not needed since libraries don't require full linking)
errorstring to return additional error information
debugif true then compilation should try to enable gdb to jump into compiled functions

Implements etiss::JIT.

Definition at line 136 of file LLVMJIT.cpp.

References compat::createDiagnostics(), compat::get_virtual_source(), etiss::jitFiles(), loadedLibs_, and orcJit_.

Here is the call graph for this function:

Member Data Documentation

◆ loadedLibs_

std::unordered_set<std::string> etiss::LLVMJIT::loadedLibs_
private

Definition at line 31 of file LLVMJIT.h.

Referenced by translate().

◆ orcJit_

std::unique_ptr<OrcJit> etiss::LLVMJIT::orcJit_
private

Definition at line 30 of file LLVMJIT.h.

Referenced by getFunction(), LLVMJIT(), and translate().


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