[pypy-dev] Flow graphs, backends and JIT

haael haael at interia.pl
Tue Sep 18 14:41:12 CEST 2012


>>>>>> 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.

So I don't understand anything again. Where exactly JIT is coded? What is the 
difference between the build process of a JIT and non-JIT binary? It's not in 
the flow graphs. It is in the backend. How can C backend and, say, CLI backend 
share 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.

Nothing in particular. I just want to gain some knowledge and start hacking 
PyPy. I used to write compilers and some embedded programming, so I thought 
that writing a new backend may be the easiest for me. Said again, I just want 
to start.

> Cheers,
> fijal
>

haael



More information about the pypy-dev mailing list