#include "pt-jit.h"
Public Member Functions | |
jit_function | convert_function (const jit_module &module, const jit_block_list &blocks, const std::list< jit_value * > &constants, octave_user_function &fcn, const std::vector< jit_type * > &args) |
llvm::Function * | convert_loop (const jit_module &module, const jit_block_list &blocks, const std::list< jit_value * > &constants, const std::string &llvm_function_name) |
const std::vector< std::pair< std::string, bool > > & | get_arguments (void) const |
virtual void | visit (jit_argument &) |
virtual void | visit (jit_assign &) |
virtual void | visit (jit_block &) |
virtual void | visit (jit_branch &) |
virtual void | visit (jit_call &) |
virtual void | visit (jit_cond_branch &) |
virtual void | visit (jit_const_bool &) |
virtual void | visit (jit_const_complex &) |
virtual void | visit (jit_const_index &) |
virtual void | visit (jit_const_range &) |
virtual void | visit (jit_const_scalar &) |
virtual void | visit (jit_const_string &) |
virtual void | visit (jit_error_check &) |
virtual void | visit (jit_extract_argument &) |
virtual void | visit (jit_magic_end &) |
virtual void | visit (jit_phi &) |
virtual void | visit (jit_return &) |
virtual void | visit (jit_store_argument &) |
virtual void | visit (jit_variable &) |
Private Member Functions | |
void | convert (const jit_block_list &blocks, const std::list< jit_value * > &constants) |
void | finish_phi (jit_phi *phi) |
void | visit (jit_value &jvalue) |
void | visit (jit_value *jvalue) |
Private Attributes | |
std::map< std::string, int > | m_argument_index |
std::vector< std::pair< std::string, bool > > | m_argument_vec |
std::map< std::string, llvm::Value * > | m_arguments |
bool | m_converting_function |
jit_function | m_creating |
llvm::Function * | m_function |
llvm::BasicBlock * | m_prelude |
|
private |
Definition at line 1424 of file pt-jit.cc.
References octave::jit_block_list::begin(), octave::jit_block::begin(), octave::builder, octave::context, octave::jit_block_list::end(), octave::jit_block::end(), finish_phi(), m_function, octave::jit_block::name(), octave::jit_value::stash_llvm(), octave::jit_block::to_llvm(), and visit().
Referenced by convert_function(), and convert_loop().
jit_function octave::jit_convert_llvm::convert_function | ( | const jit_module & | module, |
const jit_block_list & | blocks, | ||
const std::list< jit_value * > & | constants, | ||
octave_user_function & | fcn, | ||
const std::vector< jit_type * > & | args | ||
) |
Definition at line 1378 of file pt-jit.cc.
References octave::jit_function::argument(), octave::jit_block::back(), octave::jit_block_list::back(), octave::base_list< elt_type >::begin(), octave::builder, convert(), octave::base_list< elt_type >::end(), octave::jit_convention::internal, m_arguments, m_converting_function, m_creating, m_function, m_prelude, octave::tree_decl_elt::name(), octave::jit_function::new_block(), octave_user_function::parameter_list(), octave::jit_return::result_type(), and octave::jit_function::to_llvm().
Referenced by octave::jit_function_info::jit_function_info().
llvm::Function * octave::jit_convert_llvm::convert_loop | ( | const jit_module & | module, |
const jit_block_list & | blocks, | ||
const std::list< jit_value * > & | constants, | ||
const std::string & | llvm_function_name | ||
) |
Definition at line 1320 of file pt-jit.cc.
References octave::jit_block::begin(), octave::builder, octave::context, convert(), octave::jit_module::create_llvm_function(), octave::jit_block::end(), octave::jit_block_list::front(), octave::jit_typeinfo::get_any(), m_argument_vec, m_arguments, m_converting_function, m_function, m_prelude, and octave::jit_type::to_llvm().
Referenced by octave::jit_info::compile().
|
private |
Definition at line 1463 of file pt-jit.cc.
References octave::jit_instruction::argument_count(), octave::jit_instruction::argument_llvm(), octave::jit_phi::incoming_llvm(), and octave::jit_phi::to_llvm().
Referenced by convert().
|
inline |
Definition at line 266 of file pt-jit.h.
Referenced by octave::jit_info::compile().
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1646 of file pt-jit.cc.
References octave::jit_assign::artificial(), octave::builder, octave::jit_function::call(), octave::jit_typeinfo::get_release(), octave::jit_assign::overwrite(), octave::jit_assign::src(), octave::jit_value::stash_llvm(), octave::jit_value::to_llvm(), octave::jit_value::type(), and octave::jit_function::valid().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1527 of file pt-jit.cc.
References octave::jit_block::begin(), octave::builder, octave::jit_block::end(), and octave::jit_block::to_llvm().
Referenced by convert().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1536 of file pt-jit.cc.
References octave::builder, octave::jit_value::stash_llvm(), and octave::jit_terminator::successor_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1552 of file pt-jit.cc.
References octave::jit_instruction::argument(), octave::jit_instruction::arguments(), octave::builder, octave::jit_function::call(), octave::jit_call::overload(), and octave::jit_value::stash_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1542 of file pt-jit.cc.
References octave::builder, octave::jit_cond_branch::cond_llvm(), octave::jit_value::stash_llvm(), and octave::jit_terminator::successor_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1474 of file pt-jit.cc.
References octave::builder, octave::jit_value::stash_llvm(), and octave::jit_const< T, EXTRACT_T, PASS_T, QUOTE >::value().
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1624 of file pt-jit.cc.
References octave::builder, octave::jit_error_check::check_variable(), octave::jit_typeinfo::insert_error_check(), octave::jit_typeinfo::insert_interrupt_check(), panic_impossible, octave::jit_value::stash_llvm(), octave::jit_terminator::successor_llvm(), octave::jit_error_check::var_error_state, and octave::jit_error_check::var_interrupt.
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1565 of file pt-jit.cc.
References octave::builder, octave::jit_function::call(), m_arguments, m_converting_function, octave::jit_extract_argument::name(), octave::jit_extract_argument::overload(), and octave::jit_value::stash_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1668 of file pt-jit.cc.
References octave::builder, octave::jit_function::call(), octave::jit_magic_end::context::m_count, octave::jit_magic_end::context::m_index, octave::jit_magic_end::context::m_value, octave::jit_magic_end::overload(), octave::jit_magic_end::resolve_context(), and octave::jit_value::stash_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1607 of file pt-jit.cc.
References octave::jit_instruction::argument_count(), octave::builder, octave::jit_value::stash_llvm(), and octave::jit_value::type_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1591 of file pt-jit.cc.
References octave::builder, octave::jit_function::do_return(), m_converting_function, m_creating, octave::jit_return::result(), and octave::jit_value::to_llvm().
|
virtual |
Implements octave::jit_ir_walker.
Definition at line 1582 of file pt-jit.cc.
References octave::builder, octave::jit_function::call(), m_arguments, octave::jit_store_argument::name(), octave::jit_store_argument::overload(), octave::jit_store_argument::result(), and octave::jit_value::stash_llvm().
|
inlineprivate |
Definition at line 304 of file pt-jit.h.
References octave::jit_value::accept().
|
inlineprivate |
|
virtual |
Implements octave::jit_ir_walker.
|
private |
|
private |
Definition at line 281 of file pt-jit.h.
Referenced by convert_loop().
|
private |
Definition at line 284 of file pt-jit.h.
Referenced by convert_function(), convert_loop(), and visit().
|
private |
Definition at line 286 of file pt-jit.h.
Referenced by convert_function(), convert_loop(), and visit().
|
private |
Definition at line 289 of file pt-jit.h.
Referenced by convert_function(), and visit().
|
private |
Definition at line 291 of file pt-jit.h.
Referenced by convert(), convert_function(), and convert_loop().
|
private |
Definition at line 292 of file pt-jit.h.
Referenced by convert_function(), and convert_loop().