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 | Private Member Functions | Private Attributes | Friends | List of all members
jit_function Class Reference

#include "jit-typeinfo.h"

Collaboration diagram for jit_function:
Collaboration graph
[legend]

Public Member Functions

 jit_function ()
 jit_function (llvm::Module *amodule, jit_convention::type acall_conv, const llvm::Twine &aname, jit_type *aresult, const std::vector< jit_type * > &aargs)
 jit_function (const jit_function &fn, jit_type *aresult, const std::vector< jit_type * > &aargs)
 jit_function (const jit_function &fn)
template<typename T >
void add_mapping (llvm::ExecutionEngine *engine, T fn)
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
llvm::Value * call (llvm::IRBuilderD &builder, const std::vector< jit_value * > &in_args) const
llvm::Value * call (llvm::IRBuilderD &builder, const std::vector< llvm::Value * > &in_args=std::vector< llvm::Value * >()) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(llvm::Value *, arg, 1)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(llvm::Value *, arg, 2)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(llvm::Value *, arg, 3)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(llvm::Value *, arg, 4)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(llvm::Value *, arg, 5)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(jit_value *, arg, 1)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(jit_value *, arg, 2)) const
llvm::Value * call (llvm::IRBuilderD &builder, OCT_MAKE_DECL_LIST(jit_value *, arg, 3)) const
bool can_error (void) const
void do_return (llvm::IRBuilderD &builder, llvm::Value *rval=0, 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=0)
jit_typeresult (void) const
bool sret (void) const
llvm::Function * to_llvm (void) const
bool valid (void) const

Private Member Functions

void do_add_mapping (llvm::ExecutionEngine *engine, void *fn)

Private Attributes

std::vector< jit_type * > args
jit_convention::type call_conv
llvm::Function * llvm_function
bool mcan_error
llvm::Module * module
jit_typemresult

Friends

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

Detailed Description

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

Constructor & Destructor Documentation

jit_function::jit_function ( )

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

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

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

jit_function::jit_function ( const jit_function fn)

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

Member Function Documentation

template<typename T >
void jit_function::add_mapping ( llvm::ExecutionEngine *  engine,
fn 
)
inline
llvm::Value * jit_function::argument ( llvm::IRBuilderD builder,
size_t  idx 
) const
jit_type* jit_function::argument_type ( size_t  idx) const
inline

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

Referenced by jit_typeinfo::mirror_binary().

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

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

Referenced by jit_operation::add_overload().

llvm::Value * jit_function::call ( llvm::IRBuilderD builder,
const std::vector< jit_value * > &  in_args 
) const
llvm::Value * jit_function::call ( llvm::IRBuilderD builder,
const std::vector< llvm::Value * > &  in_args = std::vector<llvm::Value *> () 
) const
llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(llvm::Value *, arg,1)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(llvm::Value *, arg,2)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(llvm::Value *, arg,3)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(llvm::Value *, arg,4)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(llvm::Value *, arg,5)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(jit_value *, arg,1)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(jit_value *, arg,2)   
) const
inline

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

llvm::Value* jit_function::call ( llvm::IRBuilderD builder,
OCT_MAKE_DECL_LIST(jit_value *, arg,3)   
) const
inline

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

bool jit_function::can_error ( void  ) const
inline

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

Referenced by jit_typeinfo::mirror_binary().

void jit_function::do_add_mapping ( llvm::ExecutionEngine *  engine,
void fn 
)
private

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

References llvm_function, and valid().

void jit_function::do_return ( llvm::IRBuilderD builder,
llvm::Value *  rval = 0,
bool  verify = true 
)
void jit_function::erase ( void  )

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

References llvm_function.

Referenced by jit_function_info::jit_function_info().

void jit_function::mark_can_error ( void  )
inline
std::string jit_function::name ( void  ) const

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

References llvm_function.

Referenced by jit_typeinfo::mirror_binary().

llvm::BasicBlock * jit_function::new_block ( const std::string &  aname = "body",
llvm::BasicBlock *  insert_before = 0 
)
jit_type* jit_function::result ( void  ) const
inline
bool jit_function::sret ( void  ) const
inline

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

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

llvm::Function* jit_function::to_llvm ( void  ) const
inline
bool jit_function::valid ( void  ) const
inline

Friends And Related Function Documentation

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

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

Member Data Documentation

std::vector<jit_type *> jit_function::args
private

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

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

jit_convention::type jit_function::call_conv
private

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

Referenced by argument(), call(), do_return(), jit_function(), and operator<<().

llvm::Function* jit_function::llvm_function
private
bool jit_function::mcan_error
private

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

llvm::Module* jit_function::module
private

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

Referenced by jit_function().

jit_type* jit_function::mresult
private

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

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


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