JIT: Difference between revisions

33 bytes removed ,  5 December 2013
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
== JIT development in octave ==
This page should help interested persons which want to start hacking on the current JIT implementation in octave. It's '''NOT''' intended for octave users.
This page should help interested persons which want to start hacking on the current JIT implementation in octave. It's '''NOT''' intended for octave users.


Line 15: Line 13:
If the conversion fails at any stage, we give up and use the interpreter. Normally, this is done by throwing a jit_fail_exception. The reason why we can't go directly to the LLVM IR, is because Octave's AST does not contain any type information, but LLVM's IR requires it. For example, A = B+C. If B and C are matrices, this has as a drastically different meaning than if B and C are scalars. We use the current types of variables to determine the types of the rest of the variables in the loop.
If the conversion fails at any stage, we give up and use the interpreter. Normally, this is done by throwing a jit_fail_exception. The reason why we can't go directly to the LLVM IR, is because Octave's AST does not contain any type information, but LLVM's IR requires it. For example, A = B+C. If B and C are matrices, this has as a drastically different meaning than if B and C are scalars. We use the current types of variables to determine the types of the rest of the variables in the loop.


=== source code entries ===
=== Source code entries ===


* libinterp/parse-tree/pt-eval.cc line 317
* libinterp/parse-tree/pt-eval.cc line 317
501

edits