27 #if !defined (octave_jit_util_h)
28 #define octave_jit_util_h 1
34 #if defined(HAVE_LLVM_IR_DATALAYOUT_H) || defined(HAVE_LLVM_DATALAYOUT_H)
35 #define HAVE_LLVM_DATALAYOUT
45 #ifdef LEGACY_PASSMANAGER
47 class FunctionPassManager;
51 class FunctionPassManager;
54 class ExecutionEngine;
67 template <
bool preserveNames>
70 template <
bool preserveNames,
typename T,
typename Inserter>
98 std::ostream&
operator<< (std::ostream& os,
const llvm::Value& v);
100 template <
typename HOLDER_T,
typename SUB_T>
106 template <
typename LIST_T,
typename NODE_T>
117 use_head->stash_value (0);
130 template <
typename LIST_T,
typename NODE_T>
151 jit_ilist *ilist =
mvalue;
152 NODE_T *sthis =
static_cast<NODE_T *
> (
this);
174 jit_ilist *ilist =
mvalue;
200 template <
typename T,
typename U>
203 return dynamic_cast<T *
> (
value);
206 #define JIT_ASSIGN_ARG(i) the_args[i] = arg ## i;
207 #define JIT_EXPAND(ret, fname, type, isconst, N) \
208 ret fname (JIT_PARAM_ARGS OCT_MAKE_DECL_LIST (type, arg, N)) isconst \
210 std::vector<type> the_args (N); \
211 OCT_ITERATE_MACRO (JIT_ASSIGN_ARG, N); \
212 return fname (JIT_PARAMS the_args); \
std::ostream & operator<<(std::ostream &os, const llvm::Value &v)
void stash_value(LIST_T *avalue)
jit_internal_list< LIST_T, NODE_T > jit_ilist
LIST_T * value(void) const
size_t use_count(void) const
NODE_T * first_use(void) const
NODE_T * prev(void) const
NODE_T * next(void) const
jit_fail_exception(const std::string &reason)
IRBuilder< true, ConstantFolder, IRBuilderDefaultInserter< true > > IRBuilderD
virtual ~jit_internal_list(void)