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

#include "jit-ir.h"

Inheritance diagram for octave::jit_call:
Collaboration diagram for octave::jit_call:

Public Member Functions

 jit_call (const jit_operation &(*aoperation)(void))
 
template<typename ... Args>
 jit_call (const jit_operation &(*aoperation)(void), jit_value *arg1, Args... other_args)
 
 jit_call (const jit_operation &aoperation)
 
 jit_call (const jit_operation &aoperation, const std::vector< jit_value * > &args)
 
template<typename ... Args>
 jit_call (const jit_operation &aoperation, jit_value *arg1, Args... other_args)
 
virtual void accept (jit_ir_walker &walker)
 
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
 
bool can_error (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
 
const jit_operationoperation (void) const
 
const jit_functionoverload (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)
 
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::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 * > m_already_infered
 
llvm::Value * m_llvm_value
 

Static Private Member Functions

static size_t next_id (bool reset=false)
 

Private Attributes

std::vector< jit_usem_arguments
 
size_t m_id
 
bool m_in_worklist
 
jit_instructionm_last_use
 
std::list< jit_instruction * >::iterator m_location
 
const jit_operationm_operation
 
jit_blockm_parent
 
jit_typem_type
 
size_t m_use_count
 
jit_usem_use_head
 
jit_usem_use_tail
 

Detailed Description

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

Constructor & Destructor Documentation

◆ jit_call() [1/5]

octave::jit_call::jit_call ( const jit_operation &(*)(void)  aoperation)
inline

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

References octave::jit_function::result(), and octave::jit_function::valid().

◆ jit_call() [2/5]

octave::jit_call::jit_call ( const jit_operation aoperation)
inline

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

References octave::jit_function::result(), and octave::jit_function::valid().

◆ jit_call() [3/5]

template<typename ... Args>
octave::jit_call::jit_call ( const jit_operation aoperation,
jit_value arg1,
Args...  other_args 
)
inline

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

◆ jit_call() [4/5]

template<typename ... Args>
octave::jit_call::jit_call ( const jit_operation &(*)(void)  aoperation,
jit_value arg1,
Args...  other_args 
)
inline

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

◆ jit_call() [5/5]

octave::jit_call::jit_call ( const jit_operation aoperation,
const std::vector< jit_value * > &  args 
)
inline

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

Member Function Documentation

◆ accept()

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

Implements octave::jit_value.

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

◆ argument()

◆ argument_count()

◆ argument_llvm()

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

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

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

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

◆ argument_type_llvm()

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

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

◆ argument_types()

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

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

◆ arguments()

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

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

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

◆ can_error()

bool octave::jit_call::can_error ( void  ) const
inline

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

◆ construct_ssa()

virtual void octave::jit_instruction::construct_ssa ( void  )
inlinevirtualinherited

Reimplemented in octave::jit_phi.

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

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

◆ do_construct_ssa()

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

◆ first_use()

jit_use * octave::jit_internal_list< jit_value , jit_use >::first_use ( void  ) const
inlineinherited

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

◆ first_use_block()

◆ has_llvm()

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

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

◆ id()

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

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

◆ in_worklist()

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

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

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

◆ infer()

◆ last_use()

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

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

◆ location()

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

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

◆ needs_release()

◆ next_id()

static size_t octave::jit_instruction::next_id ( bool  reset = false)
inlinestaticprivateinherited

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

◆ operation()

const jit_operation& octave::jit_call::operation ( void  ) const
inline

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

◆ overload()

const jit_function& octave::jit_call::overload ( void  ) const
inline

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

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

◆ parent()

◆ 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_instruction::pop_variable ( void  )
inlinevirtualinherited

Reimplemented in octave::jit_assign_base.

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

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

◆ print()

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

Implements octave::jit_value.

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

Referenced by infer().

◆ print_argument()

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

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

◆ print_indent()

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

◆ print_string()

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

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

◆ push_argument()

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

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

◆ push_variable()

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

Reimplemented in octave::jit_assign_base.

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

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

◆ remove()

◆ replace_with()

◆ reset_ids()

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

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

◆ short_print()

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

Reimplemented from octave::jit_value.

Reimplemented in octave::jit_magic_end, and octave::jit_assign_base.

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

References octave::jit_print(), octave::jit_instruction::m_id, and octave::jit_value::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 405 of file jit-ir.h.

◆ stash_in_worklist()

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

Definition at line 199 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 234 of file jit-ir.h.

◆ stash_llvm()

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

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

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

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

◆ to_llvm()

llvm::Value* octave::jit_value::to_llvm ( void  ) const
inlineinherited

◆ type()

◆ type_llvm()

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

Definition at line 213 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 218 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 147 of file jit-util.h.

Member Data Documentation

◆ m_already_infered

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

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

Referenced by infer().

◆ m_arguments

std::vector<jit_use> octave::jit_instruction::m_arguments
privateinherited

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

◆ m_id

size_t octave::jit_instruction::m_id
privateinherited

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

Referenced by octave::jit_instruction::short_print().

◆ m_in_worklist

bool octave::jit_value::m_in_worklist
privateinherited

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

◆ m_last_use

jit_instruction* octave::jit_value::m_last_use
privateinherited

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

◆ m_llvm_value

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

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

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

◆ m_location

std::list<jit_instruction *>::iterator octave::jit_instruction::m_location
privateinherited

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

Referenced by octave::jit_instruction::remove().

◆ m_operation

const jit_operation& octave::jit_call::m_operation
private

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

Referenced by infer().

◆ m_parent

jit_block* octave::jit_instruction::m_parent
privateinherited

◆ m_type

jit_type* octave::jit_value::m_type
privateinherited

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

◆ m_use_count

size_t octave::jit_internal_list< jit_value , jit_use >::m_use_count
privateinherited

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

◆ m_use_head

jit_use * octave::jit_internal_list< jit_value , jit_use >::m_use_head
privateinherited

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

◆ m_use_tail

jit_use * octave::jit_internal_list< jit_value , jit_use >::m_use_tail
privateinherited

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


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