GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "jit-ir.h"
Public Member Functions | |
jit_instruction (void) | |
jit_instruction (size_t nargs) | |
jit_instruction (jit_value *arg0, jit_value *arg1) | |
jit_instruction (jit_value *arg0, jit_value *arg1, jit_value *arg2) | |
jit_instruction (jit_value *arg0) | |
jit_instruction (jit_value *arg0, jit_value *arg1, jit_value *arg2, jit_value *arg3) | |
jit_instruction (const std::vector< jit_value * > &aarguments) | |
virtual void | accept (jit_ir_walker &walker)=0 |
jit_value * | argument (size_t i) const |
size_t | argument_count (void) const |
llvm::Value * | argument_llvm (size_t i) const |
jit_type * | argument_type (size_t i) const |
llvm::Type * | argument_type_llvm (size_t i) const |
const std::vector< jit_type * > & | argument_types (void) const |
const std::vector< jit_use > & | arguments (void) const |
virtual void | construct_ssa (void) |
jit_use * | first_use (void) const |
jit_block * | first_use_block (void) |
bool | has_llvm (void) const |
size_t | id (void) const |
bool | in_worklist (void) const |
virtual bool | infer (void) |
jit_instruction * | last_use (void) const |
std::list< jit_instruction * > ::iterator | location (void) const |
virtual bool | needs_release (void) const |
jit_block * | parent (void) const |
llvm::BasicBlock * | parent_llvm (void) const |
virtual void | pop_variable (void) |
virtual std::ostream & | print (std::ostream &os, size_t indent=0) const =0 |
std::ostream & | print_argument (std::ostream &os, size_t i) const |
std::string | print_string (void) |
void | push_argument (jit_value *arg) |
virtual void | push_variable (void) |
void | remove (void) |
virtual void | replace_with (jit_value *value) |
void | resize_arguments (size_t acount, jit_value *adefault=0) |
virtual std::ostream & | short_print (std::ostream &os) const |
void | stash_argument (size_t i, jit_value *arg) |
void | stash_in_worklist (bool ain_worklist) |
void | stash_last_use (jit_instruction *alast_use) |
void | stash_llvm (llvm::Value *compiled) |
void | stash_parent (jit_block *aparent, std::list< jit_instruction * >::iterator alocation) |
void | stash_type (jit_type *new_ty) |
llvm::Value * | to_llvm (void) const |
jit_type * | type (void) const |
llvm::Type * | type_llvm (void) const |
const std::string & | type_name (void) const |
size_t | use_count (void) const |
Static Public Member Functions | |
static void | reset_ids (void) |
Protected Member Functions | |
void | do_construct_ssa (size_t start, size_t end) |
std::ostream & | print_indent (std::ostream &os, size_t indent=0) const |
Protected Attributes | |
std::vector< jit_type * > | already_infered |
llvm::Value * | llvm_value |
Static Private Member Functions | |
static size_t | next_id (bool reset=false) |
Private Attributes | |
std::vector< jit_use > | marguments |
size_t | mid |
std::list< jit_instruction * > ::iterator | mlocation |
jit_block * | mparent |
|
inline |
Definition at line 326 of file jit-ir.h.
Referenced by jit_return::print().
|
inline |
|
inline |
|
pure virtualinherited |
Definition at line 359 of file jit-ir.h.
References stash_argument().
Referenced by argument_type_llvm(), do_construct_ssa(), jit_cond_branch::print(), jit_return::print(), print_argument(), jit_terminator::print_successor(), jit_phi::prune(), jit_infer::release_dead_phi(), jit_infer::release_temp(), jit_magic_end::resolve_context(), jit_infer::simplify_phi(), jit_assign::src(), and jit_convert_llvm::visit().
|
inline |
Definition at line 401 of file jit-ir.h.
Referenced by jit_convert_llvm::finish_phi(), jit_phi::infer(), jit_call::infer(), parent(), jit_return::print(), jit_phi::prune(), jit_infer::release_dead_phi(), jit_infer::release_temp(), jit_infer::simplify_phi(), and jit_convert_llvm::visit().
|
inline |
Definition at line 364 of file jit-ir.h.
References next_id().
Referenced by jit_convert_llvm::finish_phi().
Definition at line 370 of file jit-ir.h.
References marguments.
Referenced by jit_phi::infer(), and jit_call::infer().
|
inline |
Definition at line 375 of file jit-ir.h.
References argument(), and jit_value::to_llvm().
|
inline |
|
inline |
Definition at line 417 of file jit-ir.h.
References marguments.
Referenced by jit_convert_llvm::visit().
|
inlinevirtual |
Reimplemented in jit_phi.
Definition at line 427 of file jit-ir.h.
References marguments.
Referenced by jit_infer::do_construct_ssa().
Definition at line 226 of file jit-ir.cc.
References arg(), argument(), jit_variable::has_top(), stash_argument(), and jit_variable::top().
Referenced by parent().
|
inlineinherited |
Definition at line 120 of file jit-util.h.
Referenced by jit_value::first_use_block(), jit_call::needs_release(), jit_variable::print(), and jit_value::replace_with().
|
inherited |
Definition at line 153 of file jit-ir.cc.
References jit_internal_list< jit_value, jit_use >::first_use(), jit_internal_node< LIST_T, NODE_T >::next(), jit_use::user(), and jit_use::user_parent().
Referenced by jit_infer::release_temp().
|
inlineinherited |
Definition at line 245 of file jit-ir.h.
References jit_value::print().
|
inline |
Definition at line 454 of file jit-ir.h.
Referenced by jit_typeinfo::create_identity(), and jit_extract_argument::name().
|
inlineinherited |
Definition at line 191 of file jit-ir.h.
Referenced by jit_infer::push_worklist().
|
inlinevirtual |
Reimplemented in jit_magic_end, jit_call, jit_terminator, jit_phi, and jit_assign.
Definition at line 432 of file jit-ir.h.
Referenced by jit_infer::infer(), and jit_infer::simplify_phi().
|
inlineinherited |
|
inline |
|
inlinevirtualinherited |
Reimplemented in jit_call.
Definition at line 236 of file jit-ir.h.
References jit_value::mlast_use.
Referenced by jit_infer::release_dead_phi(), and jit_infer::release_temp().
Definition at line 462 of file jit-ir.h.
Referenced by argument_llvm().
|
inline |
Definition at line 438 of file jit-ir.h.
References argument_count(), and do_construct_ssa().
Referenced by jit_function::call(), jit_phi::infer(), jit_terminator::infer(), jit_phi::prune(), jit_infer::simplify_phi(), jit_use::user_parent(), and jit_phi_incomming::user_parent().
llvm::BasicBlock * jit_instruction::parent_llvm | ( | void | ) | const |
Definition at line 212 of file jit-ir.cc.
References mparent, and jit_block::to_llvm().
|
inlinevirtual |
Reimplemented in jit_assign_base.
Definition at line 425 of file jit-ir.h.
Referenced by jit_block::pop_all().
|
pure virtualinherited |
Implemented in jit_return, jit_store_argument, jit_extract_argument, jit_magic_end, jit_error_check, jit_call, jit_cond_branch, jit_branch, jit_phi, jit_assign, jit_variable, jit_block, jit_const< T, EXTRACT_T, PASS_T, QUOTE >, and jit_argument.
Referenced by jit_value::has_llvm(), jit_print(), jit_argument::print(), and jit_block::print().
|
inline |
Definition at line 381 of file jit-ir.h.
References argument(), and jit_value::type().
|
inlineprotectedinherited |
Definition at line 262 of file jit-ir.h.
References jit_value::llvm_value.
Referenced by jit_call::jit_call(), jit_store_argument::name(), jit_argument::print(), jit_block::print(), jit_error_check::print(), and jit_magic_end::print().
|
inlineinherited |
|
inline |
|
inlinevirtual |
Reimplemented in jit_assign_base.
Definition at line 423 of file jit-ir.h.
Referenced by jit_infer::do_construct_ssa().
void jit_instruction::remove | ( | void | ) |
Definition at line 204 of file jit-ir.cc.
References mlocation, mparent, jit_block::remove(), and resize_arguments().
Referenced by jit_infer::do_construct_ssa(), jit_block::merge(), jit_infer::release_dead_phi(), and jit_infer::remove_dead().
|
virtualinherited |
Reimplemented in jit_block.
Definition at line 168 of file jit-ir.cc.
References jit_internal_list< jit_value, jit_use >::first_use(), jit_use::index(), stash_argument(), and jit_use::user().
Referenced by jit_phi::prune(), jit_infer::release_dead_phi(), and jit_block::replace_with().
|
inlinestatic |
Definition at line 354 of file jit-ir.h.
Referenced by jit_convert::initialize().
Definition at line 406 of file jit-ir.h.
Referenced by jit_magic_end::jit_magic_end(), jit_phi::prune(), and remove().
|
virtual |
Reimplemented from jit_value.
Reimplemented in jit_magic_end, and jit_assign_base.
Definition at line 218 of file jit-ir.cc.
References jit_print(), mid, and jit_value::type().
Definition at line 389 of file jit-ir.h.
Referenced by argument(), do_construct_ssa(), jit_magic_end::jit_magic_end(), jit_block::maybe_split(), jit_phi::prune(), jit_value::replace_with(), and jit_infer::simplify_phi().
|
inlineinherited |
Definition at line 196 of file jit-ir.h.
References jit_value::min_worklist.
Referenced by jit_infer::infer(), and jit_infer::push_worklist().
|
inlineinherited |
|
inlineinherited |
Definition at line 256 of file jit-ir.h.
References jit_value::llvm_value.
Referenced by jit_convert_llvm::convert(), jit_argument::print(), and jit_convert_llvm::visit().
|
inline |
Definition at line 447 of file jit-ir.h.
References mparent.
Referenced by jit_block::insert_after(), jit_block::insert_before(), jit_block::internal_append(), jit_block::merge(), and jit_block::prepend().
|
inlineinherited |
Definition at line 220 of file jit-ir.h.
Referenced by jit_phi::infer(), jit_call::infer(), jit_magic_end::infer(), jit_argument::print(), jit_const< T, EXTRACT_T, PASS_T, QUOTE >::print(), jit_assign::print(), and jit_extract_argument::print().
|
inlineinherited |
Definition at line 250 of file jit-ir.h.
References jit_value::llvm_value.
Referenced by argument_type_llvm(), jit_phi::to_llvm(), jit_terminator::to_llvm(), and jit_convert_llvm::visit().
|
inlineinherited |
Definition at line 208 of file jit-ir.h.
Referenced by jit_typeinfo::do_end(), jit_phi::infer(), jit_call::infer(), jit_magic_end::infer(), jit_call::needs_release(), print_argument(), short_print(), jit_infer::simplify_phi(), jit_factory::track_value(), and jit_convert_llvm::visit().
|
inlineinherited |
Definition at line 210 of file jit-ir.h.
Referenced by jit_convert_llvm::visit().
|
inlineinherited |
Definition at line 215 of file jit-ir.h.
References jit_type::to_llvm(), and jit_value::ty.
|
inlineinherited |
Definition at line 122 of file jit-util.h.
Referenced by jit_call::infer().
|
protected |
Definition at line 460 of file jit-ir.h.
Referenced by jit_call::infer().
|
protectedinherited |
Definition at line 269 of file jit-ir.h.
Referenced by jit_value::print_indent(), jit_value::stash_llvm(), jit_value::to_llvm(), and jit_block::to_llvm().
|
private |
Definition at line 471 of file jit-ir.h.
Referenced by argument_type(), arguments(), and construct_ssa().
|
private |
Definition at line 473 of file jit-ir.h.
Referenced by jit_block::label(), short_print(), and jit_type::type_id().
|
private |
Definition at line 475 of file jit-ir.h.
Referenced by remove(), and jit_block::visited().
|
private |
Definition at line 474 of file jit-ir.h.
Referenced by jit_type::parent(), parent_llvm(), remove(), and stash_parent().