GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::jit_phi Class Reference

#include "jit-ir.h"

Inheritance diagram for octave::jit_phi:
Collaboration diagram for octave::jit_phi:

Public Member Functions

 jit_phi (jit_variable *adest, size_t npred)
 
virtual void accept (jit_ir_walker &walker)
 
void add_incoming (jit_block *from, jit_value *value)
 
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_variabledest (void) const
 
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
 
jit_blockincoming (size_t i) const
 
llvm::BasicBlock * incoming_llvm (size_t i) 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)
 
bool prune (void)
 
void push_argument (jit_value *arg)
 
virtual void push_variable (void)
 
void remove (void)
 
virtual void replace_with (jit_value *m_value)
 
void resize_arguments (size_t acount, jit_value *adefault=nullptr)
 
virtual std::ostream & short_print (std::ostream &os) const
 
void stash_argument (size_t i, jit_value *arg)
 
template<typename ... Args>
void stash_argument (size_t i, jit_value *arg1, Args... aargs)
 
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_type)
 
llvm::PHINode * to_llvm (void) const
 
jit_typetype (void) const
 
llvm::Type * type_llvm (void) const
 
const std::stringtype_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 * > m_already_infered
 
llvm::Value * m_llvm_value
 

Private Attributes

std::vector< jit_phi_incomingm_incoming
 

Detailed Description

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

Constructor & Destructor Documentation

◆ jit_phi()

octave::jit_phi::jit_phi ( jit_variable adest,
size_t  npred 
)
inline

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

Member Function Documentation

◆ accept()

void octave::jit_phi::accept ( jit_ir_walker walker)
virtual

Implements octave::jit_value.

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

◆ add_incoming()

void octave::jit_phi::add_incoming ( jit_block from,
jit_value value 
)
inline

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

References value.

Referenced by octave::jit_infer::do_construct_ssa().

◆ argument()

◆ argument_count()

◆ argument_llvm()

llvm::Value* octave::jit_instruction::argument_llvm ( size_t  i) const
inlineinherited

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

References argument, and i.

Referenced by octave::jit_convert_llvm::finish_phi().

◆ argument_type()

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

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

References argument, and i.

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

◆ argument_type_llvm()

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

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

References argument, and i.

◆ argument_types()

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

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

◆ arguments()

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

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

Referenced by octave::jit_convert_llvm::visit().

◆ construct_ssa()

virtual void octave::jit_phi::construct_ssa ( void  )
inlinevirtual

Reimplemented from octave::jit_instruction.

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

◆ dest()

jit_variable* octave::jit_assign_base::dest ( void  ) const
inlineinherited

◆ do_construct_ssa()

void octave::jit_instruction::do_construct_ssa ( size_t  start,
size_t  end 
)
protectedinherited

◆ first_use()

◆ first_use_block()

◆ has_llvm()

bool octave::jit_value::has_llvm ( void  ) const
inlineinherited

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

◆ id()

size_t octave::jit_instruction::id ( void  ) const
inlineinherited

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

◆ in_worklist()

bool octave::jit_value::in_worklist ( void  ) const
inlineinherited

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

Referenced by octave::jit_infer::push_worklist().

◆ incoming()

jit_block* octave::jit_phi::incoming ( size_t  i) const
inline

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

References i.

Referenced by infer(), prune(), octave::jit_infer::release_dead_phi(), and octave::jit_infer::simplify_phi().

◆ incoming_llvm()

llvm::BasicBlock* octave::jit_phi::incoming_llvm ( size_t  i) const
inline

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

References i.

Referenced by octave::jit_convert_llvm::finish_phi().

◆ infer()

◆ last_use()

jit_instruction* octave::jit_value::last_use ( void  ) const
inlineinherited

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

◆ location()

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

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

◆ needs_release()

virtual bool octave::jit_value::needs_release ( void  ) const
inlinevirtualinherited

Reimplemented in octave::jit_call.

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

Referenced by octave::jit_infer::release_temp().

◆ parent()

jit_block* octave::jit_instruction::parent ( void  ) const
inlineinherited

◆ parent_llvm()

llvm::BasicBlock * octave::jit_instruction::parent_llvm ( void  ) const
inherited

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

References octave::jit_instruction::m_parent, and octave::jit_block::to_llvm().

◆ pop_variable()

virtual void octave::jit_assign_base::pop_variable ( void  )
inlinevirtualinherited

Reimplemented from octave::jit_instruction.

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

◆ print()

virtual std::ostream& octave::jit_phi::print ( std::ostream &  os,
size_t  indent = 0 
) const
inlinevirtual

Implements octave::jit_value.

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

References argument, i, os, and string.

◆ print_argument()

std::ostream& octave::jit_instruction::print_argument ( std::ostream &  os,
size_t  i 
) const
inlineinherited

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

References argument, i, and os.

◆ print_indent()

std::ostream& octave::jit_value::print_indent ( std::ostream &  os,
size_t  indent = 0 
) const
inlineprotectedinherited

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

References i, and os.

Referenced by octave::jit_block::print(), octave::jit_error_check::print(), and octave::jit_magic_end::print().

◆ print_string()

std::string octave::jit_value::print_string ( void  )
inlineinherited

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

◆ prune()

◆ push_argument()

void octave::jit_instruction::push_argument ( jit_value arg)
inlineinherited

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

References arg.

◆ push_variable()

virtual void octave::jit_assign_base::push_variable ( void  )
inlinevirtualinherited

Reimplemented from octave::jit_instruction.

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

◆ remove()

◆ replace_with()

◆ reset_ids()

static void octave::jit_instruction::reset_ids ( void  )
inlinestaticinherited

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

Referenced by octave::jit_convert::initialize().

◆ resize_arguments()

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

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

References i.

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

◆ short_print()

virtual std::ostream& octave::jit_assign_base::short_print ( std::ostream &  os) const
inlinevirtualinherited

Reimplemented from octave::jit_instruction.

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

References id, octave::jit_print(), os, and type.

◆ stash_argument() [1/2]

void octave::jit_instruction::stash_argument ( size_t  i,
jit_value arg 
)
inlineinherited

◆ stash_argument() [2/2]

template<typename ... Args>
void octave::jit_instruction::stash_argument ( size_t  i,
jit_value arg1,
Args...  aargs 
)
inlineinherited

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

References i.

◆ stash_in_worklist()

void octave::jit_value::stash_in_worklist ( bool  ain_worklist)
inlineinherited

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

Referenced by octave::jit_infer::push_worklist().

◆ stash_last_use()

void octave::jit_value::stash_last_use ( jit_instruction alast_use)
inlineinherited

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

◆ stash_llvm()

void octave::jit_value::stash_llvm ( llvm::Value *  compiled)
inlineinherited

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

References compiled.

Referenced by octave::jit_convert_llvm::convert(), and octave::jit_convert_llvm::visit().

◆ stash_parent()

void octave::jit_instruction::stash_parent ( jit_block aparent,
std::list< jit_instruction *>::iterator  alocation 
)
inlineinherited

◆ stash_type()

void octave::jit_value::stash_type ( jit_type new_type)
inlineinherited

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

Referenced by infer(), octave::jit_call::infer(), and octave::jit_magic_end::infer().

◆ to_llvm()

llvm::PHINode * octave::jit_phi::to_llvm ( void  ) const

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

References octave::jit_value::to_llvm().

Referenced by octave::jit_convert_llvm::finish_phi().

◆ type()

◆ type_llvm()

llvm::Type* octave::jit_value::type_llvm ( void  ) const
inlineinherited

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

Referenced by octave::jit_convert_llvm::visit().

◆ type_name()

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

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

◆ use_count()

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

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

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

Member Data Documentation

◆ m_already_infered

std::vector<jit_type *> octave::jit_instruction::m_already_infered
protectedinherited

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

Referenced by octave::jit_call::infer().

◆ m_incoming

std::vector<jit_phi_incoming> octave::jit_phi::m_incoming
private

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

Referenced by prune().

◆ m_llvm_value

llvm::Value* octave::jit_value::m_llvm_value
protectedinherited

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

Referenced by octave::jit_block::to_llvm().


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