#include "pt-jit.h"
Public Types | |
typedef jit_convert::variable_map | variable_map |
Public Member Functions | |
jit_infer (jit_factory &afactory, jit_block_list &ablocks, const variable_map &avmap) | |
jit_block_list & | get_blocks (void) const |
jit_factory & | get_factory (void) const |
void | infer (void) |
Private Member Functions | |
void | append_users (jit_value *v) |
void | append_users_term (jit_terminator *term) |
void | construct_ssa (void) |
void | do_construct_ssa (jit_block &block, size_t avisit_count) |
jit_block & | entry_block (void) |
jit_block & | final_block (void) |
void | place_releases (void) |
void | push_worklist (jit_instruction *instr) |
void | release_dead_phi (jit_block &ablock) |
void | release_temp (jit_block &ablock, std::set< jit_value *> &temp) |
void | remove_dead () |
void | simplify_phi (void) |
void | simplify_phi (jit_phi &phi) |
Private Attributes | |
jit_block_list & | m_blocks |
jit_factory & | m_factory |
const variable_map & | m_vmap |
std::list< jit_instruction * > | m_worklist |
octave::jit_infer::jit_infer | ( | jit_factory & | afactory, |
jit_block_list & | ablocks, | ||
const variable_map & | avmap | ||
) |
|
private |
Definition at line 1730 of file pt-jit.cc.
References octave::jit_internal_list< LIST_T, NODE_T >::first_use(), octave::jit_internal_node< LIST_T, NODE_T >::next(), and push_worklist().
Referenced by infer().
|
private |
Definition at line 1737 of file pt-jit.cc.
References octave::jit_terminator::alive(), octave::jit_block::begin(), octave::jit_block::end(), i, push_worklist(), octave::jit_terminator::successor(), octave::jit_terminator::successor_count(), and octave::jit_block::terminator().
Referenced by infer().
|
private |
Definition at line 1756 of file pt-jit.cc.
References b, octave::jit_block::compute_df(), octave::jit_block::compute_idom(), octave::jit_factory::create(), octave::jit_block::create_dom_tree(), do_construct_ssa(), entry_block(), final_block(), octave::jit_block_list::label(), m_blocks, m_factory, m_vmap, octave::jit_block::prepend(), and octave::jit_block::use_count().
Referenced by infer().
Definition at line 1804 of file pt-jit.cc.
References octave::jit_phi::add_incoming(), octave::jit_block::begin(), octave::jit_instruction::construct_ssa(), octave::jit_assign_base::dest(), octave::jit_block::dom_successor(), octave::jit_block::dom_successor_count(), octave::jit_block::end(), i, octave::jit_block::pop_all(), octave::jit_instruction::push_variable(), octave::jit_instruction::remove(), octave::jit_block::successor(), octave::jit_block::successor_count(), octave::jit_internal_list< LIST_T, NODE_T >::use_count(), var, and octave::jit_block::visited().
Referenced by construct_ssa().
|
inlineprivate |
Definition at line 352 of file pt-jit.h.
References octave::jit_block_list::front().
Referenced by construct_ssa(), and infer().
|
inlineprivate |
Definition at line 354 of file pt-jit.h.
References octave::jit_block_list::back().
Referenced by construct_ssa(), and release_temp().
|
inline |
|
inline |
void octave::jit_infer::infer | ( | void | ) |
Definition at line 1692 of file pt-jit.cc.
References append_users(), append_users_term(), octave::jit_factory::constants(), construct_ssa(), entry_block(), octave::jit_block_list::label(), m_blocks, m_factory, m_worklist, next, place_releases(), push_worklist(), remove_dead(), simplify_phi(), and octave::jit_block::terminator().
Referenced by octave::jit_info::compile(), and octave::jit_function_info::jit_function_info().
|
private |
Definition at line 1851 of file pt-jit.cc.
References octave::jit_block_list::begin(), octave::jit_block_list::end(), octave::jit_block::id(), m_blocks, octave::jit_block::NO_ID, release_dead_phi(), and release_temp().
Referenced by infer().
|
private |
Definition at line 1868 of file pt-jit.cc.
References octave::jit_value::in_worklist(), m_worklist, and octave::jit_value::stash_in_worklist().
Referenced by append_users(), append_users_term(), and infer().
|
private |
Definition at line 1928 of file pt-jit.cc.
References arg, octave::jit_instruction::argument(), octave::jit_instruction::argument_count(), octave::jit_block::begin(), octave::jit_factory::create(), octave::jit_block::end(), octave::jit_internal_list< LIST_T, NODE_T >::first_use(), i, octave::jit_phi::incoming(), octave::jit_block::insert_before(), m_blocks, m_factory, octave::jit_block::maybe_split(), octave::config::release(), octave::jit_typeinfo::release(), octave::jit_instruction::remove(), octave::jit_value::replace_with(), octave::jit_block::terminator(), octave::jit_internal_list< LIST_T, NODE_T >::use_count(), and octave::jit_use::user().
Referenced by place_releases().
Definition at line 1964 of file pt-jit.cc.
References arg, octave::jit_instruction::argument(), octave::jit_instruction::argument_count(), octave::jit_block::begin(), octave::jit_factory::create(), octave::jit_block::end(), final_block(), octave::jit_value::first_use_block(), i, octave::jit_block::insert_after(), octave::jit_block::insert_before(), m_blocks, m_factory, octave::jit_block::maybe_split(), octave::jit_value::needs_release(), octave::config::release(), octave::jit_typeinfo::release(), octave::jit_block::terminator(), and value.
Referenced by place_releases().
|
private |
Definition at line 1878 of file pt-jit.cc.
References octave::jit_terminator::alive(), b, octave::jit_block_list::begin(), octave::jit_factory::create(), octave::jit_block_list::end(), octave::jit_block_list::erase(), octave::jit_terminator::infer(), m_blocks, m_factory, octave::jit_phi::prune(), octave::jit_instruction::remove(), octave::jit_terminator::successor(), and octave::jit_terminator::successor_count().
Referenced by infer().
|
private |
Definition at line 2021 of file pt-jit.cc.
References octave::jit_block_list::begin(), octave::jit_block::begin(), octave::jit_block_list::end(), octave::jit_block::end(), and m_blocks.
Referenced by infer().
|
private |
Definition at line 2035 of file pt-jit.cc.
References arg, octave::jit_instruction::argument(), octave::jit_instruction::argument_count(), octave::jit_typeinfo::cast(), octave::jit_factory::create(), octave::jit_assign_base::dest(), i, octave::jit_phi::incoming(), octave::jit_instruction::infer(), octave::jit_block::insert_before(), m_blocks, m_factory, octave::jit_block::maybe_split(), octave::jit_instruction::parent(), octave::jit_instruction::stash_argument(), octave::jit_block::terminator(), and octave::jit_value::type().
|
private |
Definition at line 339 of file pt-jit.h.
Referenced by construct_ssa(), infer(), place_releases(), release_dead_phi(), release_temp(), remove_dead(), and simplify_phi().
|
private |
Definition at line 340 of file pt-jit.h.
Referenced by construct_ssa(), infer(), release_dead_phi(), release_temp(), remove_dead(), and simplify_phi().
|
private |
Definition at line 341 of file pt-jit.h.
Referenced by construct_ssa().
|
private |
Definition at line 342 of file pt-jit.h.
Referenced by infer(), and push_worklist().