
On Tue, Sep 18, 2012 at 9:35 AM, haael <haael@interia.pl> wrote:
3. Which component actually does the JIT? Is it just a tweak on the code generator or are the flow graphs generated differently?
The flow graphs are taken from the translator and modified by the JIT generator.
My question is:
Does JIT involve another "transformation" of the flow graphs? In normal (non-JIT) code generation some flow graphs are fed to the backend generator. Wich step is different in the JIT case? Does the backend generator get different flow graphs or are the same flow graphs compiled differently by a tweaked code generator?
They get the same flowgraphs.
So, if I understand well, there is no common JIT code among different backends? The JIT we have is the C-backend specific? Different backends would need a new JIT approach?
Most of the JIT code is not C-backend specific. Backends are along the line of x86, arm, PPC. If you want to create a say LLVM backend, you would reuse most of the JIT code. Regarding your other questions - what sort of backend you have in mind? Because depending on it, it might be easier or harder to write one and answers to all your other questions might be different. Cheers, fijal