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

#include "pt-jit.h"

Inheritance diagram for octave::jit_info:
Collaboration diagram for octave::jit_info:

Public Types

typedef unsigned llvm_gv_linkage
 
typedef std::map< std::string, const octave_value * > vmap
 

Public Member Functions

 jit_info (tree &tee)
 
 jit_info (tree &tee, const octave_value &for_bounds)
 
 jit_info (tree_simple_for_command &tee, const octave_value &for_bounds)
 
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
 
bool execute (const vmap &extra_vars=vmap()) 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
 
bool match (const vmap &extra_vars=vmap()) const
 
void optimize (llvm::Function *fn) const
 

Private Types

typedef void(* jited_function) (octave_base_value **)
 
typedef jit_convert::type_bound type_bound
 
typedef jit_convert::type_bound_vector type_bound_vector
 

Private Member Functions

void compile (tree &tee, jit_type *for_bounds=0)
 
void do_add_global_mapping (const llvm::GlobalValue *gv, void *p) const
 
octave_value find (const vmap &extra_vars, const std::string &vname) const
 

Private Attributes

std::vector< std::pair< std::string, bool > > m_arguments
 
type_bound_vector m_bounds
 
llvm::ExecutionEngine * m_engine
 
jited_function m_function
 
std::string m_llvm_function_name
 
llvm::Module * m_module
 

Detailed Description

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

Member Typedef Documentation

◆ jited_function

typedef void(* octave::jit_info::jited_function) (octave_base_value **)
private

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

◆ llvm_gv_linkage

typedef unsigned octave::jit_module::llvm_gv_linkage
inherited

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

◆ type_bound

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

◆ type_bound_vector

◆ vmap

typedef std::map<std::string, const octave_value *> octave::jit_info::vmap

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

Constructor & Destructor Documentation

◆ jit_info() [1/3]

octave::jit_info::jit_info ( tree tee)

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

References compile().

◆ jit_info() [2/3]

octave::jit_info::jit_info ( tree tee,
const octave_value for_bounds 
)

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

References compile(), and octave::jit_typeinfo::type_of().

◆ jit_info() [3/3]

octave::jit_info::jit_info ( tree_simple_for_command tee,
const octave_value for_bounds 
)

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

References compile(), and octave::jit_typeinfo::type_of().

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
inlineinherited

◆ compile()

◆ create_global_variable()

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

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

References octave::jit_module::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
inherited

◆ do_add_global_mapping()

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

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

References octave::jit_module::m_engine.

◆ execute()

bool octave::jit_info::execute ( const vmap extra_vars = vmap ()) const

◆ finalizeObject()

void octave::jit_module::finalizeObject ( void  )
inherited

◆ find()

octave_value octave::jit_info::find ( const vmap extra_vars,
const std::string &  vname 
) const
private

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

References octave::__require_current_scope__().

Referenced by execute(), and match().

◆ get_intrinsic_declaration()

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

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

References octave::jit_module::m_module.

◆ getFunctionAddress()

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

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

References octave::jit_module::m_engine, and name.

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

◆ match()

bool octave::jit_info::match ( const vmap extra_vars = vmap ()) const

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

References find(), m_bounds, m_function, and octave::jit_typeinfo::type_of().

Referenced by octave::tree_jit::do_execute().

◆ optimize()

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

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

References octave::jit_module::m_module, and Vdebug_jit.

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

Member Data Documentation

◆ m_arguments

std::vector<std::pair<std::string, bool> > octave::jit_info::m_arguments
private

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

Referenced by compile(), and execute().

◆ m_bounds

type_bound_vector octave::jit_info::m_bounds
private

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

Referenced by compile(), and match().

◆ m_engine

◆ m_function

jited_function octave::jit_info::m_function
private

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

Referenced by compile(), execute(), and match().

◆ m_llvm_function_name

std::string octave::jit_info::m_llvm_function_name
private

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

Referenced by compile().

◆ m_module


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