Mercurial > octave-nkf
diff libinterp/interp-core/jit-typeinfo.h @ 15603:44272909d926
Stop JIT on interrupt
* jit-ir.cc (jit_call::needs_release): Move to cc file and do not release
artificial assigns.
(jit_error_check::variable_to_strign): New function.
(jit_error_check::print): Move to cc file and improve output.
* jit-ir.h (jit_call::needs_release): Move to cc file.
(jit_error_check::variable): New enum.
(jit_error_check::variable_to_string): New declaration.
(jit_error_check::jit_error_check): Add variable argument and new overload.
(jit_error_check::check_variable, jit_error_check::has_check_for): New function.
(jit_error_check::check_for): Ensure has_check_for is true.
(jit_error_check::print): Move to cc file.
(jit_error_check::check_alive): Always true if has_check_for is false.
(jit_error_check::mvariable): New variable.
* jit-typeinfo.cc (jit_typeinfo::jit_typeinfo): Initialize
loctave_interrupt_state and fix name of cast to any.
(jit_typeinfo::do_insert_interrupt_check): New function.
* jit-typeinfo.h (jit_typeinfo::insert_interrupt_check): New function.
(jit_typeinfo::do_insert_interrupt_check): New declaration.
(jit_typeinfo::loctave_interrupt_state): New variable.
* pt-jit.cc (jit_convert::visit_simple_for_command,
jit_convert::visit_while_command): Check interrupt state.
(jit_convert::create_check_impl): Specify var_error_state check.
(jit_convert_llvm::visit): Generate var_interrupt error check.
(jit_function_info::execute, jit_info::execute): Call octave_quit.
author | Max Brister <max@2bass.com> |
---|---|
date | Sun, 04 Nov 2012 21:11:33 -0700 |
parents | 8ccb187b24e9 |
children | 1f076c40c133 |
line wrap: on
line diff
--- a/libinterp/interp-core/jit-typeinfo.h Sun Nov 04 20:09:23 2012 -0700 +++ b/libinterp/interp-core/jit-typeinfo.h Sun Nov 04 21:11:33 2012 -0700 @@ -566,6 +566,11 @@ return instance->do_insert_error_check (bld); } + static llvm::Value *insert_interrupt_check (llvm::IRBuilderD& bld) + { + return instance->do_insert_interrupt_check (bld); + } + static const jit_operation& end (void) { return instance->end_fn; @@ -692,6 +697,8 @@ llvm::Value *do_insert_error_check (llvm::IRBuilderD& bld); + llvm::Value *do_insert_interrupt_check (llvm::IRBuilderD& bld); + void add_builtin (const std::string& name); void register_intrinsic (const std::string& name, size_t id, @@ -747,6 +754,9 @@ int next_id; llvm::GlobalVariable *lerror_state; + llvm::GlobalVariable *loctave_interrupt_state; + + llvm::Type *sig_atomic_type; std::vector<jit_type*> id_to_type; jit_type *any;