GNU Octave  4.4.1
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)
 
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
 
jited_function m_function
 
std::string m_llvm_function_name
 

Detailed Description

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

Member Typedef Documentation

◆ jited_function

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

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

◆ llvm_gv_linkage

typedef unsigned octave::jit_module::llvm_gv_linkage
inherited

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

◆ type_bound

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

◆ type_bound_vector

◆ vmap

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

Constructor & Destructor Documentation

◆ jit_info() [1/3]

octave::jit_info::jit_info ( tree tee)

Definition at line 2682 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 2689 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 2696 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

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

References p.

Referenced by octave::jit_typeinfo::create_external(), and octave::jit_typeinfo::jit_typeinfo().

◆ 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 2405 of file pt-jit.cc.

References octave::jit_module::m_module, name, and type.

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

◆ 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 2843 of file pt-jit.cc.

References octave::__require_current_scope__(), and octave::symbol_scope::varval().

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 2396 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 2422 of file pt-jit.cc.

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

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

◆ match()

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

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

References find(), first, i, m_bounds, m_function, string, type, octave::jit_typeinfo::type_of(), and value.

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

◆ optimize()

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

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

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

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

Member Data Documentation

◆ m_arguments

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

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

Referenced by compile(), and execute().

◆ m_bounds

type_bound_vector octave::jit_info::m_bounds
private

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

Referenced by compile(), and match().

◆ m_function

jited_function octave::jit_info::m_function
private

Definition at line 615 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 614 of file pt-jit.h.

Referenced by compile().


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