GNU Octave  6.2.0
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 (octave_user_function &fcn, const octave_value_list &args, octave_value_list &retval)
 
static bool execute (tree_simple_for_command &cmd, const octave_value &bounds)
 
static bool execute (tree_while_command &cmd)
 
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)
 

Static Public Attributes

static llvm::LLVMContext llvm_context
 

Private Member Functions

 tree_jit (void)
 
void do_dump_all_modules (void) const
 
bool do_execute (octave_user_function &fcn, const octave_value_list &args, octave_value_list &retval)
 
bool do_execute (tree_simple_for_command &cmd, const octave_value &bounds)
 
bool do_execute (tree_while_command &cmd)
 
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 364 of file pt-jit.h.

Constructor & Destructor Documentation

◆ ~tree_jit()

octave::tree_jit::~tree_jit ( void  )

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

References target_machine.

◆ tree_jit()

octave::tree_jit::tree_jit ( void  )
private

Definition at line 2107 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 2131 of file pt-jit.cc.

References error().

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]

◆ do_getPointerToNamedFunction()

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

Definition at line 2163 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 2179 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 2195 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 2222 of file pt-jit.cc.

References octave::context, initialized, m, 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 2151 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 2157 of file pt-jit.cc.

References jm_list.

Referenced by unregister_jit_module().

◆ enabled()

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

◆ execute() [1/3]

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

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

References do_execute(), and retval.

◆ execute() [2/3]

◆ execute() [3/3]

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

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

References do_execute().

◆ generate_unique_forloop_name()

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

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

◆ generate_unique_function_name()

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

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

◆ generate_unique_module_name()

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

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

◆ get_target_machine()

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

Definition at line 395 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 442 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 2119 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 2216 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 421 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 2313 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 424 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 382 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

◆ llvm_context

llvm::LLVMContext octave::tree_jit::llvm_context
static

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

◆ next_forloop_number

int octave::tree_jit::next_forloop_number = 0
staticprivate

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

◆ next_function_number

int octave::tree_jit::next_function_number = 0
staticprivate

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

◆ next_module_number

int octave::tree_jit::next_module_number = 0
staticprivate

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

◆ target_machine

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

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

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


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