GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
jit_error_check Class Reference

#include "jit-ir.h"

Inheritance diagram for jit_error_check:
Inheritance graph
[legend]
Collaboration diagram for jit_error_check:
Collaboration graph
[legend]

Public Types

enum  variable { var_error_state, var_interrupt }
 

Public Member Functions

 jit_error_check (variable var, jit_call *acheck_for, jit_block *normal, jit_block *error)
 
 jit_error_check (variable var, jit_block *normal, jit_block *error)
 
virtual void accept (jit_ir_walker &walker)
 
bool alive (const jit_block *asuccessor) const
 
bool alive (size_t idx) const
 
bool alive (int idx) const
 
jit_valueargument (size_t i) const
 
size_t argument_count (void) const
 
llvm::Value * argument_llvm (size_t i) const
 
jit_typeargument_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
 
jit_callcheck_for (void) const
 
variable check_variable (void) const
 
virtual void construct_ssa (void)
 
jit_usefirst_use (void) const
 
jit_blockfirst_use_block (void)
 
bool has_check_for (void) const
 
bool has_llvm (void) const
 
size_t id (void) const
 
bool in_worklist (void) const
 
virtual bool infer (void)
 
jit_instructionlast_use (void) const
 
std::list< jit_instruction * >
::iterator 
location (void) const
 
virtual bool needs_release (void) const
 
jit_blockparent (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
 
std::ostream & print_argument (std::ostream &os, size_t i) const
 
std::string print_string (void)
 
std::ostream & print_successor (std::ostream &os, size_t idx=0) const
 
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)
 
jit_blocksuccessor (size_t idx=0) const
 
size_t successor_count (void) const
 
size_t successor_index (const jit_block *asuccessor) const
 
llvm::BasicBlock * successor_llvm (size_t idx=0) const
 
llvm::TerminatorInst * to_llvm (void) const
 
jit_typetype (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)
 
static std::string variable_to_string (variable v)
 

Protected Member Functions

virtual bool check_alive (size_t idx) const
 
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
 

Private Attributes

variable mvariable
 

Detailed Description

Definition at line 1190 of file jit-ir.h.

Member Enumeration Documentation

Enumerator
var_error_state 
var_interrupt 

Definition at line 1195 of file jit-ir.h.

Constructor & Destructor Documentation

jit_error_check::jit_error_check ( variable  var,
jit_call acheck_for,
jit_block normal,
jit_block error 
)
inline

Definition at line 1203 of file jit-ir.h.

jit_error_check::jit_error_check ( variable  var,
jit_block normal,
jit_block error 
)
inline

Definition at line 1207 of file jit-ir.h.

Member Function Documentation

void jit_error_check::accept ( jit_ir_walker walker)
virtual

Implements jit_value.

Definition at line 185 of file jit-ir.cc.

bool jit_terminator::alive ( const jit_block asuccessor) const
inlineinherited
bool jit_terminator::alive ( size_t  idx) const
inlineinherited

Definition at line 1049 of file jit-ir.h.

bool jit_terminator::alive ( int  idx) const
inlineinherited

Definition at line 1051 of file jit-ir.h.

jit_value* jit_instruction::argument ( size_t  i) const
inlineinherited
size_t jit_instruction::argument_count ( void  ) const
inlineinherited
llvm::Value* jit_instruction::argument_llvm ( size_t  i) const
inlineinherited

Definition at line 364 of file jit-ir.h.

References jit_instruction::next_id().

Referenced by jit_convert_llvm::finish_phi().

jit_type* jit_instruction::argument_type ( size_t  i) const
inlineinherited

Definition at line 370 of file jit-ir.h.

References jit_instruction::marguments.

Referenced by jit_phi::infer(), and jit_call::infer().

llvm::Type* jit_instruction::argument_type_llvm ( size_t  i) const
inlineinherited

Definition at line 375 of file jit-ir.h.

References jit_instruction::argument(), and jit_value::to_llvm().

const std::vector<jit_type *>& jit_instruction::argument_types ( void  ) const
inlineinherited

Definition at line 420 of file jit-ir.h.

const std::vector<jit_use>& jit_instruction::arguments ( void  ) const
inlineinherited

Definition at line 417 of file jit-ir.h.

References jit_instruction::marguments.

Referenced by jit_convert_llvm::visit().

virtual bool jit_error_check::check_alive ( size_t  idx) const
inlineprotectedvirtual

Reimplemented from jit_terminator.

Definition at line 1227 of file jit-ir.h.

jit_call* jit_error_check::check_for ( void  ) const
inline

Definition at line 1217 of file jit-ir.h.

Referenced by print().

variable jit_error_check::check_variable ( void  ) const
inline

Definition at line 1210 of file jit-ir.h.

Referenced by jit_convert_llvm::visit().

virtual void jit_instruction::construct_ssa ( void  )
inlinevirtualinherited

Reimplemented in jit_phi.

Definition at line 427 of file jit-ir.h.

References jit_instruction::marguments.

Referenced by jit_infer::do_construct_ssa().

void jit_instruction::do_construct_ssa ( size_t  start,
size_t  end 
)
protectedinherited
jit_use * jit_internal_list< jit_value , jit_use >::first_use ( void  ) const
inlineinherited
jit_block * jit_value::first_use_block ( void  )
inherited
bool jit_error_check::has_check_for ( void  ) const
inline

Definition at line 1212 of file jit-ir.h.

Referenced by print().

bool jit_value::has_llvm ( void  ) const
inlineinherited

Definition at line 245 of file jit-ir.h.

References jit_value::print().

size_t jit_instruction::id ( void  ) const
inlineinherited

Definition at line 454 of file jit-ir.h.

Referenced by jit_typeinfo::create_identity(), and jit_extract_argument::name().

bool jit_value::in_worklist ( void  ) const
inlineinherited

Definition at line 191 of file jit-ir.h.

Referenced by jit_infer::push_worklist().

bool jit_terminator::infer ( void  )
virtualinherited
jit_instruction* jit_value::last_use ( void  ) const
inlineinherited

Definition at line 229 of file jit-ir.h.

std::list<jit_instruction *>::iterator jit_instruction::location ( void  ) const
inlineinherited

Definition at line 440 of file jit-ir.h.

virtual bool jit_value::needs_release ( void  ) const
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().

jit_block* jit_instruction::parent ( void  ) const
inlineinherited
llvm::BasicBlock * jit_instruction::parent_llvm ( void  ) const
inherited

Definition at line 212 of file jit-ir.cc.

References jit_instruction::mparent, and jit_block::to_llvm().

virtual void jit_instruction::pop_variable ( void  )
inlinevirtualinherited

Reimplemented in jit_assign_base.

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

Referenced by jit_block::pop_all().

std::ostream & jit_error_check::print ( std::ostream &  os,
size_t  indent = 0 
) const
virtual
std::ostream& jit_instruction::print_argument ( std::ostream &  os,
size_t  i 
) const
inlineinherited

Definition at line 381 of file jit-ir.h.

References jit_instruction::argument(), and jit_value::type().

std::ostream& jit_value::print_indent ( std::ostream &  os,
size_t  indent = 0 
) const
inlineprotectedinherited
std::string jit_value::print_string ( void  )
inlineinherited

Definition at line 222 of file jit-ir.h.

std::ostream& jit_terminator::print_successor ( std::ostream &  os,
size_t  idx = 0 
) const
inlineinherited

Definition at line 1033 of file jit-ir.h.

References jit_instruction::argument().

Referenced by jit_call::jit_call(), and print().

void jit_instruction::push_argument ( jit_value arg)
inlineinherited

Definition at line 394 of file jit-ir.h.

virtual void jit_instruction::push_variable ( void  )
inlinevirtualinherited

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  )
inherited
void jit_value::replace_with ( jit_value value)
virtualinherited
static void jit_instruction::reset_ids ( void  )
inlinestaticinherited

Definition at line 354 of file jit-ir.h.

Referenced by jit_convert::initialize().

void jit_instruction::resize_arguments ( size_t  acount,
jit_value adefault = 0 
)
inlineinherited

Definition at line 406 of file jit-ir.h.

Referenced by jit_magic_end::jit_magic_end(), jit_phi::prune(), and jit_instruction::remove().

std::ostream & jit_instruction::short_print ( std::ostream &  os) const
virtualinherited

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(), jit_instruction::mid, and jit_value::type().

void jit_instruction::stash_argument ( size_t  i,
jit_value arg 
)
inlineinherited
void jit_value::stash_in_worklist ( bool  ain_worklist)
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().

void jit_value::stash_last_use ( jit_instruction alast_use)
inlineinherited

Definition at line 231 of file jit-ir.h.

void jit_value::stash_llvm ( llvm::Value *  compiled)
inlineinherited
void jit_instruction::stash_parent ( jit_block aparent,
std::list< jit_instruction * >::iterator  alocation 
)
inlineinherited
void jit_value::stash_type ( jit_type new_ty)
inlineinherited
jit_block* jit_terminator::successor ( size_t  idx = 0) const
inlineinherited
size_t jit_terminator::successor_count ( void  ) const
inlineinherited
size_t jit_terminator::successor_index ( const jit_block asuccessor) const
inherited
llvm::BasicBlock* jit_terminator::successor_llvm ( size_t  idx = 0) const
inlineinherited

Definition at line 1026 of file jit-ir.h.

Referenced by jit_convert_llvm::visit().

llvm::TerminatorInst * jit_terminator::to_llvm ( void  ) const
inherited

Definition at line 701 of file jit-ir.cc.

References jit_value::to_llvm().

Referenced by jit_typeinfo::register_intrinsic().

jit_type* jit_value::type ( void  ) const
inlineinherited
llvm::Type* jit_value::type_llvm ( void  ) const
inlineinherited

Definition at line 210 of file jit-ir.h.

Referenced by jit_convert_llvm::visit().

const std::string& jit_value::type_name ( void  ) const
inlineinherited

Definition at line 215 of file jit-ir.h.

References jit_type::to_llvm(), and jit_value::ty.

size_t jit_internal_list< jit_value , jit_use >::use_count ( void  ) const
inlineinherited

Definition at line 122 of file jit-util.h.

Referenced by jit_call::infer().

std::string jit_error_check::variable_to_string ( variable  v)
static

Definition at line 755 of file jit-ir.cc.

References panic_impossible, var_error_state, and var_interrupt.

Referenced by print().

Member Data Documentation

std::vector<jit_type *> jit_instruction::already_infered
protectedinherited

Definition at line 460 of file jit-ir.h.

Referenced by jit_call::infer().

llvm::Value* jit_value::llvm_value
protectedinherited
variable jit_error_check::mvariable
private

Definition at line 1234 of file jit-ir.h.

Referenced by print().


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