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

#include "jit-typeinfo.h"

Collaboration diagram for octave::jit_function:

Public Types

typedef std::vector< llvm::Value * > arg_vec
 

Public Member Functions

 jit_function (const jit_function &fn)
 
 jit_function (const jit_function &fn, jit_type *aresult, const std::vector< jit_type * > &aargs)
 
 jit_function (const jit_module *amodule, jit_convention::type acall_conv, const llvm::Twine &aname, jit_type *aresult, const std::vector< jit_type * > &aargs)
 
 jit_function (void)
 
llvm::Value * argument (llvm::IRBuilderD &builder, size_t idx) const
 
jit_typeargument_type (size_t idx) const
 
const std::vector< jit_type * > & arguments (void) const
 
template<typename ... Args>
llvm::Value * call (llvm::IRBuilderD &builder, arg_vec &in_args, llvm::Value *arg1, Args... other_args) const
 
template<typename T , typename ... Args>
llvm::Value * call (llvm::IRBuilderD &builder, arg_vec &in_args, T *arg1, Args... other_args) const
 
llvm::Value * call (llvm::IRBuilderD &builder, const arg_vec &in_args=arg_vec()) const
 
llvm::Value * call (llvm::IRBuilderD &builder, const std::vector< jit_value * > &in_args) const
 
template<typename ... Args>
llvm::Value * call (llvm::IRBuilderD &builder, llvm::Value *arg1, Args... other_args) const
 
template<typename T , typename ... Args>
llvm::Value * call (llvm::IRBuilderD &builder, T *arg1, Args... other_args) const
 
bool can_error (void) const
 
void do_return (llvm::IRBuilderD &builder, llvm::Value *rval=nullptr, bool verify=true)
 
void erase (void)
 
void mark_can_error (void)
 
std::string name (void) const
 
llvm::BasicBlock * new_block (const std::string &aname="body", llvm::BasicBlock *insert_before=nullptr)
 
jit_typeresult (void) const
 
bool sret (void) const
 
llvm::Function * to_llvm (void) const
 
bool valid (void) const
 

Private Attributes

std::vector< jit_type * > m_args
 
jit_convention::type m_call_conv
 
bool m_can_error
 
llvm::Function * m_llvm_function
 
const jit_modulem_module
 
jit_typem_result
 

Friends

std::ostream & operator<< (std::ostream &os, const jit_function &fn)
 

Detailed Description

Definition at line 238 of file jit-typeinfo.h.

Member Typedef Documentation

◆ arg_vec

typedef std::vector<llvm::Value *> octave::jit_function::arg_vec

Definition at line 269 of file jit-typeinfo.h.

Constructor & Destructor Documentation

◆ jit_function() [1/4]

octave::jit_function::jit_function ( void  )

Definition at line 561 of file jit-typeinfo.cc.

◆ jit_function() [2/4]

octave::jit_function::jit_function ( const jit_module amodule,
jit_convention::type  acall_conv,
const llvm::Twine &  aname,
jit_type aresult,
const std::vector< jit_type * > &  aargs 
)

◆ jit_function() [3/4]

octave::jit_function::jit_function ( const jit_function fn,
jit_type aresult,
const std::vector< jit_type * > &  aargs 
)

Definition at line 620 of file jit-typeinfo.cc.

◆ jit_function() [4/4]

octave::jit_function::jit_function ( const jit_function fn)

Definition at line 627 of file jit-typeinfo.cc.

Member Function Documentation

◆ argument()

◆ argument_type()

jit_type* octave::jit_function::argument_type ( size_t  idx) const
inline

Definition at line 329 of file jit-typeinfo.h.

Referenced by octave::jit_typeinfo::mirror_binary().

◆ arguments()

const std::vector<jit_type *>& octave::jit_function::arguments ( void  ) const
inline

Definition at line 335 of file jit-typeinfo.h.

Referenced by octave::jit_operation::add_overload().

◆ call() [1/6]

template<typename ... Args>
llvm::Value* octave::jit_function::call ( llvm::IRBuilderD builder,
arg_vec in_args,
llvm::Value *  arg1,
Args...  other_args 
) const
inline

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

References octave::builder.

◆ call() [2/6]

template<typename T , typename ... Args>
llvm::Value* octave::jit_function::call ( llvm::IRBuilderD builder,
arg_vec in_args,
T *  arg1,
Args...  other_args 
) const
inline

Definition at line 286 of file jit-typeinfo.h.

References octave::builder.

◆ call() [3/6]

◆ call() [4/6]

llvm::Value * octave::jit_function::call ( llvm::IRBuilderD builder,
const std::vector< jit_value * > &  in_args 
) const

Definition at line 658 of file jit-typeinfo.cc.

References octave::builder, call(), m_args, to_llvm(), and valid().

◆ call() [5/6]

template<typename ... Args>
llvm::Value* octave::jit_function::call ( llvm::IRBuilderD builder,
llvm::Value *  arg1,
Args...  other_args 
) const
inline

Definition at line 294 of file jit-typeinfo.h.

References octave::builder.

◆ call() [6/6]

template<typename T , typename ... Args>
llvm::Value* octave::jit_function::call ( llvm::IRBuilderD builder,
T *  arg1,
Args...  other_args 
) const
inline

Definition at line 304 of file jit-typeinfo.h.

References octave::builder.

◆ can_error()

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

Definition at line 323 of file jit-typeinfo.h.

Referenced by octave::jit_typeinfo::mirror_binary().

◆ do_return()

◆ erase()

void octave::jit_function::erase ( void  )

Definition at line 634 of file jit-typeinfo.cc.

References m_llvm_function.

Referenced by octave::jit_function_info::jit_function_info().

◆ mark_can_error()

◆ name()

std::string octave::jit_function::name ( void  ) const

Definition at line 644 of file jit-typeinfo.cc.

References m_llvm_function.

Referenced by octave::jit_typeinfo::mirror_binary().

◆ new_block()

◆ result()

◆ sret()

bool octave::jit_function::sret ( void  ) const
inline

Definition at line 321 of file jit-typeinfo.h.

Referenced by jit_function(), argument(), and do_return().

◆ to_llvm()

llvm::Function* octave::jit_function::to_llvm ( void  ) const
inline

◆ valid()

bool octave::jit_function::valid ( void  ) const
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const jit_function fn 
)
friend

Definition at line 789 of file jit-typeinfo.cc.

Member Data Documentation

◆ m_args

std::vector<jit_type *> octave::jit_function::m_args
private

Definition at line 342 of file jit-typeinfo.h.

Referenced by jit_function(), argument(), and call().

◆ m_call_conv

jit_convention::type octave::jit_function::m_call_conv
private

Definition at line 343 of file jit-typeinfo.h.

Referenced by jit_function(), argument(), and do_return().

◆ m_can_error

bool octave::jit_function::m_can_error
private

Definition at line 344 of file jit-typeinfo.h.

◆ m_llvm_function

llvm::Function* octave::jit_function::m_llvm_function
private

Definition at line 340 of file jit-typeinfo.h.

Referenced by jit_function(), argument(), do_return(), erase(), name(), and new_block().

◆ m_module

const jit_module* octave::jit_function::m_module
private

Definition at line 339 of file jit-typeinfo.h.

Referenced by jit_function().

◆ m_result

jit_type* octave::jit_function::m_result
private

Definition at line 341 of file jit-typeinfo.h.

Referenced by jit_function(), and do_return().


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