[LLVMdev] doc about llvm JIT
Chris Lattner
sabre at nondot.org
Wed Oct 6 14:29:20 PDT 2004
On Wed, 6 Oct 2004, Shukang Zhou wrote:
> I am interested in the JIT compiler of llvm, namely, lli. I want to know
> more about it, but I found little documentation about it. There are a few
> paragraphs about JIT in the CGO paper, a list of options dumped from "lli
> --help-hidden", and a short webpage of lli in the website. But many issues
> are not clearly described. For example,
Unfortunately there isn't just that describes it. :(
> 1. When JIT is available (-force-interpreter=false), under what condition
> the JIT compilation will be applied? (Is it applied to any code that is
> executed, or just to hot code like Dynamo?)
When the JIT is available, it is always used. JIT availability depends on
whether we have a code generator for the current target or not: currently
we support X86 and Sparc with the JIT.
> 2. What algorithms are used to identify hot loop regions and hot paths for
> runtime reoptimization?
> 3. How to relate identified executing native code (of hot loops and
> regions) back to original LLVM bytecode?
> 4. What runtime optimizations are applied in the current version?
Currently we do not perform any profile-driven runtime optimizations in
the JIT, though it would not be hard at all to do so (we already have the
profiling framework, it's just a matter of plugging them together).
There is also an internal project, known as the "reoptimizer", which does
do runtime reoptimization of programs, but others know more about it than
I.
> Would it be possible to provide a more detailed document? If not
> convenient, please give us a brief description of files which are in
> charge of these functions. I appreciate your effort and time. Thanks.
All of the JIT specific code lives in lib/ExecutionEngine/JIT. The code
shared between it and the interpreter lives in lib/ExecutionEngine. The
JIT also depends on support from a target-specific code generator, which
live in lib/Target/<architecture>.
-Chris
--
http://llvm.org/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list