GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::jit_module Class Reference

#include "pt-jit.h"

Inheritance diagram for octave::jit_module:
Collaboration diagram for octave::jit_module:

Public Types

typedef unsigned llvm_gv_linkage
 

Public Member Functions

 jit_module (const std::string &module_name=tree_jit::generate_unique_module_name())
 
 ~jit_module ()
 
template<typename ptr_type >
void add_global_mapping (const llvm::GlobalValue *gv, ptr_type p) const
 
llvm::GlobalVariable * create_global_variable (llvm::Type *type, bool is_constant, const llvm::Twine &name) const
 
llvm::Function * create_llvm_function (llvm::FunctionType *ftype, const llvm::Twine &name) const
 
void finalizeObject (void)
 
llvm::Function * get_intrinsic_declaration (size_t id, std::vector< llvm::Type * > types) const
 
uint64_t getFunctionAddress (const std::string &name) const
 
void optimize (llvm::Function *fn) const
 

Private Member Functions

void do_add_global_mapping (const llvm::GlobalValue *gv, void *p) const
 

Private Attributes

llvm::ExecutionEngine * m_engine
 
llvm::Module * m_module
 

Detailed Description

Definition at line 517 of file pt-jit.h.

Member Typedef Documentation

◆ llvm_gv_linkage

Definition at line 552 of file pt-jit.h.

Constructor & Destructor Documentation

◆ jit_module()

octave::jit_module::jit_module ( const std::string &  module_name = tree_jit::generate_unique_module_name ())

◆ ~jit_module()

octave::jit_module::~jit_module ( )

Definition at line 2350 of file pt-jit.cc.

References m_engine, and octave::tree_jit::unregister_jit_module().

Member Function Documentation

◆ add_global_mapping()

template<typename ptr_type >
void octave::jit_module::add_global_mapping ( const llvm::GlobalValue *  gv,
ptr_type  p 
) const
inline

◆ create_global_variable()

llvm::GlobalVariable * octave::jit_module::create_global_variable ( llvm::Type *  type,
bool  is_constant,
const llvm::Twine &  name 
) const

Definition at line 2381 of file pt-jit.cc.

References m_module, and name.

Referenced by octave::jit_typeinfo::jit_typeinfo().

◆ create_llvm_function()

llvm::Function * octave::jit_module::create_llvm_function ( llvm::FunctionType *  ftype,
const llvm::Twine &  name 
) const

Definition at line 2359 of file pt-jit.cc.

References m_module, and name.

Referenced by octave::jit_function::jit_function(), and octave::jit_convert_llvm::convert_loop().

◆ do_add_global_mapping()

void octave::jit_module::do_add_global_mapping ( const llvm::GlobalValue *  gv,
void *  p 
) const
private

Definition at line 2390 of file pt-jit.cc.

References m_engine.

◆ finalizeObject()

void octave::jit_module::finalizeObject ( void  )

◆ get_intrinsic_declaration()

llvm::Function * octave::jit_module::get_intrinsic_declaration ( size_t  id,
std::vector< llvm::Type * >  types 
) const

Definition at line 2372 of file pt-jit.cc.

References m_module.

◆ getFunctionAddress()

uint64_t octave::jit_module::getFunctionAddress ( const std::string &  name) const

Definition at line 2398 of file pt-jit.cc.

References m_engine, and name.

Referenced by octave::jit_function_info::jit_function_info(), and octave::jit_info::compile().

◆ optimize()

void octave::jit_module::optimize ( llvm::Function *  fn) const

Definition at line 2404 of file pt-jit.cc.

References m_module, and Vdebug_jit.

Referenced by octave::jit_function_info::jit_function_info(), and octave::jit_info::compile().

Member Data Documentation

◆ m_engine

llvm::ExecutionEngine* octave::jit_module::m_engine
private

◆ m_module

llvm::Module* octave::jit_module::m_module
private

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