GNU Octave  3.8.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 Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
jit_instruction Class Reference

#include "jit-ir.h"

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

Public Member Functions

 jit_instruction (void)
 jit_instruction (size_t nargs)
 jit_instruction (OCT_MAKE_DECL_LIST(jit_value *, arg, 1))
 jit_instruction (OCT_MAKE_DECL_LIST(jit_value *, arg, 2))
 jit_instruction (OCT_MAKE_DECL_LIST(jit_value *, arg, 3))
 jit_instruction (OCT_MAKE_DECL_LIST(jit_value *, arg, 4))
 jit_instruction (const std::vector< jit_value * > &aarguments)
virtual void accept (jit_ir_walker &walker)=0
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
virtual void construct_ssa (void)
jit_usefirst_use (void) const
jit_blockfirst_use_block (void)
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 =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_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)

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_usemarguments
size_t mid
std::list< jit_instruction * >
::iterator 
mlocation
jit_blockmparent

Detailed Description

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

Constructor & Destructor Documentation

jit_instruction::jit_instruction ( void  )
inline

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

jit_instruction::jit_instruction ( size_t  nargs)
inline

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

References already_infered, and marguments.

jit_instruction::jit_instruction ( OCT_MAKE_DECL_LIST(jit_value *, arg,1)  )
inline

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

jit_instruction::jit_instruction ( OCT_MAKE_DECL_LIST(jit_value *, arg,2)  )
inline

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

jit_instruction::jit_instruction ( OCT_MAKE_DECL_LIST(jit_value *, arg,3)  )
inline

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

jit_instruction::jit_instruction ( OCT_MAKE_DECL_LIST(jit_value *, arg,4)  )
inline

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

jit_instruction::jit_instruction ( const std::vector< jit_value * > &  aarguments)
inline

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

References stash_argument().

Member Function Documentation

virtual void jit_value::accept ( jit_ir_walker walker)
pure virtualinherited
jit_value* jit_instruction::argument ( size_t  i) const
inline
size_t jit_instruction::argument_count ( void  ) const
inline
llvm::Value* jit_instruction::argument_llvm ( size_t  i) const
inline

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

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

Referenced by jit_convert_llvm::finish_phi().

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

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

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

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

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

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

References argument(), argument_type(), and jit_type::to_llvm().

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

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

References already_infered.

Referenced by jit_call::overload().

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

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

References marguments.

Referenced by jit_convert_llvm::visit().

virtual void jit_instruction::construct_ssa ( void  )
inlinevirtual

Reimplemented in jit_phi.

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

References argument_count(), and do_construct_ssa().

Referenced by jit_infer::do_construct_ssa().

void jit_instruction::do_construct_ssa ( size_t  start,
size_t  end 
)
protected

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

References arg(), argument(), jit_variable::has_top(), stash_argument(), and jit_variable::top().

Referenced by construct_ssa().

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_value::has_llvm ( void  ) const
inlineinherited

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

References jit_value::llvm_value.

size_t jit_instruction::id ( void  ) const
inline
bool jit_value::in_worklist ( void  ) const
inlineinherited

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

References jit_value::min_worklist.

Referenced by jit_infer::push_worklist().

virtual bool jit_instruction::infer ( void  )
inlinevirtual

Reimplemented in jit_magic_end, jit_call, jit_terminator, jit_phi, and jit_assign.

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

Referenced by jit_infer::infer(), and jit_infer::simplify_phi().

jit_instruction* jit_value::last_use ( void  ) const
inlineinherited

Reimplemented in jit_variable.

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

References jit_value::mlast_use.

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

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

References mlocation.

Referenced by jit_block::insert_after(), and jit_block::insert_before().

virtual bool jit_value::needs_release ( void  ) const
inlinevirtualinherited

Reimplemented in jit_call.

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

Referenced by jit_infer::release_dead_phi(), and jit_infer::release_temp().

static size_t jit_instruction::next_id ( bool  reset = false)
inlinestaticprivate

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

Referenced by reset_ids().

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

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

References mparent, and jit_block::to_llvm().

virtual void jit_instruction::pop_variable ( void  )
inlinevirtual

Reimplemented in jit_assign_base.

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

Referenced by jit_block::pop_all().

virtual std::ostream& jit_value::print ( std::ostream &  os,
size_t  indent = 0 
) const
pure virtualinherited
std::ostream& jit_instruction::print_argument ( std::ostream &  os,
size_t  i 
) const
inline

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

References argument(), and jit_value::short_print().

Referenced by jit_call::print().

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 227 of file jit-ir.h.

References jit_value::print().

void jit_instruction::push_argument ( jit_value arg)
inline

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

References already_infered, arg(), marguments, and stash_argument().

Referenced by jit_phi::add_incomming().

virtual void jit_instruction::push_variable ( void  )
inlinevirtual

Reimplemented in jit_assign_base.

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

Referenced by jit_infer::do_construct_ssa().

void jit_instruction::remove ( void  )
void jit_value::replace_with ( jit_value value)
virtualinherited
static void jit_instruction::reset_ids ( void  )
inlinestatic

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

References next_id().

Referenced by jit_convert::initialize().

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

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

References already_infered, marguments, and stash_argument().

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

std::ostream & jit_instruction::short_print ( std::ostream &  os) const
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().

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

void jit_instruction::stash_argument ( size_t  i,
jit_value arg 
)
inline
void jit_value::stash_in_worklist ( bool  ain_worklist)
inlineinherited

Definition at line 201 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

Reimplemented in jit_variable.

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

References jit_value::mlast_use.

void jit_value::stash_llvm ( llvm::Value *  compiled)
inlineinherited
void jit_instruction::stash_parent ( jit_block aparent,
std::list< jit_instruction * >::iterator  alocation 
)
inline
void jit_value::stash_type ( jit_type new_ty)
inlineinherited
llvm::Value* jit_value::to_llvm ( void  ) const
inlineinherited

Reimplemented in jit_terminator, jit_phi, and jit_block.

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

References jit_value::llvm_value.

Referenced by argument_llvm(), and jit_convert_llvm::visit().

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

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

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

Referenced by jit_convert_llvm::visit().

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

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

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

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

Reimplemented in jit_block.

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

Referenced by jit_call::infer(), jit_call::print(), and jit_block::use_count().

Member Data Documentation

std::vector<jit_type *> jit_instruction::already_infered
protected
llvm::Value* jit_value::llvm_value
protectedinherited
std::vector<jit_use> jit_instruction::marguments
private
size_t jit_instruction::mid
private

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

Referenced by id(), jit_block::id(), short_print(), jit_block::short_print(), and jit_type::type_id().

std::list<jit_instruction *>::iterator jit_instruction::mlocation
private
jit_block* jit_instruction::mparent
private

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

Referenced by jit_type::parent(), parent(), parent_llvm(), remove(), and stash_parent().


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