Mercurial > hg > octave-lyh
diff libinterp/parse-tree/pt-eval.cc @ 15310:b055fc077224
allow jit compiler to be enabled at run-time
* pt-jit.h, pt-jit.cc (Venable_jit_debug, Venable_jit_compiler):
New variables.
(Fenable_jit_debug, Fenable_jit_compiler): New functions.
(jit_info::compile): Make JIT debugging info conditional on
Venable_jit_debug.
* pt-eval.cc (tree_evaluator::visit_simple_for_command,
tree_evaluator::visit_while_command): Make JIT compiling conditional
on Venable_jit_compiler.
* octave.cc (no_jit_compiler_option, jit_debug_option):
New file-scope variables.
(JIT_DEBUG_OPTION, NO_JIT_COMPILER_OPTION): New option macros.
(log_opts): Add --jit_debug and --no-jit-compiler options.
(octave_process_command_line): Handle JIT_DEBUG_OPTION and
NO_JIT_COMPILER_OPTION.
(octave_initialize_interpreter): Handle jit_debug_option and
no_jit_compiler_option.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 06 Sep 2012 01:33:08 -0400 |
parents | c16357c4bdbb |
children | 3f43e9d6d86e |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc +++ b/libinterp/parse-tree/pt-eval.cc @@ -44,9 +44,10 @@ #include "symtab.h" #include "unwind-prot.h" -#if HAVE_LLVM //FIXME: This should be part of tree_evaluator #include "pt-jit.h" + +#if HAVE_LLVM static tree_jit jiter; #endif @@ -310,7 +311,7 @@ octave_value rhs = expr->rvalue1 (); #if HAVE_LLVM - if (jiter.execute (cmd, rhs)) + if (Venable_jit_compiler && jiter.execute (cmd, rhs)) return; #endif @@ -1047,7 +1048,7 @@ return; #if HAVE_LLVM - if (jiter.execute (cmd)) + if (Venable_jit_compiler && jiter.execute (cmd)) return; #endif