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

#include "pt-jit.h"

Collaboration diagram for octave::tree_jit:

Public Member Functions

 ~tree_jit (void)
 

Static Public Member Functions

static jit::EngineOwner create_new_engine (jit::ModuleOwner module_owner)
 
static bool execute (tree_simple_for_command &cmd, const octave_value &bounds)
 
static bool execute (tree_while_command &cmd)
 
static bool execute (octave_user_function &fcn, const octave_value_list &args, octave_value_list &retval)
 
static std::string generate_unique_forloop_name (void)
 
static std::string generate_unique_function_name (void)
 
static std::string generate_unique_module_name (void)
 
static const llvm::TargetMachine * get_target_machine (void)
 
static void * getPointerToNamedFunction (const std::string &name)
 
static uint64_t getSymbolAddress (const std::string &name)
 
static jit::ModuleOwner open_new_module (const std::string &module_name=generate_unique_module_name())
 
static void register_jit_module (jit_module *jm)
 
static void unregister_jit_module (jit_module *jm)
 

Private Member Functions

 tree_jit (void)
 
void do_dump_all_modules (void) const
 
bool do_execute (tree_simple_for_command &cmd, const octave_value &bounds)
 
bool do_execute (tree_while_command &cmd)
 
bool do_execute (octave_user_function &fcn, const octave_value_list &args, octave_value_list &retval)
 
void * do_getPointerToNamedFunction (const std::string &Name) const
 
uint64_t do_getSymbolAddress (const std::string &name) const
 
bool do_initialize (void)
 
jit::ModuleOwner do_open_new_module (const std::string &module_name) const
 
void do_register_jit_module (jit_module *jm)
 
void do_unregister_jit_module (jit_module *jm)
 
bool enabled (void)
 
size_t trip_count (const octave_value &bounds) const
 

Static Private Member Functions

static tree_jitinstance (void)
 

Private Attributes

std::list< jit_module * > jm_list
 
llvm::TargetMachine * target_machine
 

Static Private Attributes

static bool initialized = false
 
static int next_forloop_number = 0
 
static int next_function_number = 0
 
static int next_module_number = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~tree_jit()

octave::tree_jit::~tree_jit ( void  )

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

References target_machine.

◆ tree_jit()

octave::tree_jit::tree_jit ( void  )
private

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

Member Function Documentation

◆ create_new_engine()

jit::EngineOwner octave::tree_jit::create_new_engine ( jit::ModuleOwner  module_owner)
static

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

References e, err, and string.

Referenced by octave::jit_module::jit_module().

◆ do_dump_all_modules()

void octave::tree_jit::do_dump_all_modules ( void  ) const
private

◆ do_execute() [1/3]

◆ do_execute() [2/3]

◆ do_execute() [3/3]

bool octave::tree_jit::do_execute ( octave_user_function fcn,
const octave_value_list args,
octave_value_list retval 
)
private

◆ do_getPointerToNamedFunction()

void * octave::tree_jit::do_getPointerToNamedFunction ( const std::string Name) const
private

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

References jm_list, and name.

Referenced by getPointerToNamedFunction().

◆ do_getSymbolAddress()

uint64_t octave::tree_jit::do_getSymbolAddress ( const std::string name) const
private

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

References jm_list, and name.

Referenced by getSymbolAddress().

◆ do_initialize()

bool octave::tree_jit::do_initialize ( void  )
private

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

References initialized, and target_machine.

Referenced by instance().

◆ do_open_new_module()

jit::ModuleOwner octave::tree_jit::do_open_new_module ( const std::string module_name) const
private

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

References octave::context, initialized, and target_machine.

Referenced by open_new_module().

◆ do_register_jit_module()

void octave::tree_jit::do_register_jit_module ( jit_module jm)
private

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

References jm_list.

Referenced by register_jit_module().

◆ do_unregister_jit_module()

void octave::tree_jit::do_unregister_jit_module ( jit_module jm)
private

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

References jm_list.

Referenced by unregister_jit_module().

◆ enabled()

bool octave::tree_jit::enabled ( void  )
private

◆ execute() [1/3]

◆ execute() [2/3]

static bool octave::tree_jit::execute ( tree_while_command cmd)
inlinestatic

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

References do_execute().

◆ execute() [3/3]

static bool octave::tree_jit::execute ( octave_user_function fcn,
const octave_value_list args,
octave_value_list retval 
)
inlinestatic

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

References do_execute(), fcn, and retval.

◆ generate_unique_forloop_name()

static std::string octave::tree_jit::generate_unique_forloop_name ( void  )
inlinestatic

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

References string.

◆ generate_unique_function_name()

static std::string octave::tree_jit::generate_unique_function_name ( void  )
inlinestatic

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

References string.

◆ generate_unique_module_name()

static std::string octave::tree_jit::generate_unique_module_name ( void  )
inlinestatic

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

References string.

◆ get_target_machine()

static const llvm::TargetMachine* octave::tree_jit::get_target_machine ( void  )
inlinestatic

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

References target_machine.

◆ getPointerToNamedFunction()

static void* octave::tree_jit::getPointerToNamedFunction ( const std::string name)
inlinestatic

◆ getSymbolAddress()

static uint64_t octave::tree_jit::getSymbolAddress ( const std::string name)
inlinestatic

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

References do_getSymbolAddress(), and name.

Referenced by octave::jit_memory_manager::getSymbolAddress().

◆ instance()

tree_jit & octave::tree_jit::instance ( void  )
staticprivate

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

References do_initialize(), and initialized.

Referenced by open_new_module().

◆ open_new_module()

jit::ModuleOwner octave::tree_jit::open_new_module ( const std::string module_name = generate_unique_module_name ())
static

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

References do_open_new_module(), and instance().

Referenced by octave::jit_module::jit_module().

◆ register_jit_module()

static void octave::tree_jit::register_jit_module ( jit_module jm)
inlinestatic

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

References do_register_jit_module().

Referenced by octave::jit_module::jit_module().

◆ trip_count()

size_t octave::tree_jit::trip_count ( const octave_value bounds) const
private

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

References octave_value::is_range(), Range::numel(), and octave_value::range_value().

Referenced by do_execute().

◆ unregister_jit_module()

static void octave::tree_jit::unregister_jit_module ( jit_module jm)
inlinestatic

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

References do_unregister_jit_module().

Referenced by octave::jit_module::~jit_module().

Member Data Documentation

◆ initialized

bool octave::tree_jit::initialized = false
staticprivate

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

Referenced by do_execute(), do_initialize(), do_open_new_module(), and instance().

◆ jm_list

std::list<jit_module*> octave::tree_jit::jm_list
private

◆ next_forloop_number

int octave::tree_jit::next_forloop_number = 0
staticprivate

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

◆ next_function_number

int octave::tree_jit::next_function_number = 0
staticprivate

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

◆ next_module_number

int octave::tree_jit::next_module_number = 0
staticprivate

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

◆ target_machine

llvm::TargetMachine* octave::tree_jit::target_machine
private

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

Referenced by do_initialize(), do_open_new_module(), get_target_machine(), and ~tree_jit().


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