Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-19 Thread Armin Rigo
Hi Fijal, On Wed, Sep 19, 2012 at 12:30 PM, Maciej Fijalkowski wrote: > I guess this is what pypyjit.py does, more or less. You still need the > blackhole interpreter to run in something Right, indeed, pypyjit.py fulfills already the "debugging helper" role. That leaves only the "cool hack" rol

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-19 Thread Maciej Fijalkowski
On Wed, Sep 19, 2012 at 11:38 AM, Armin Rigo wrote: > Hi Carl Friedrich, > > On Tue, Sep 18, 2012 at 10:00 PM, Carl Friedrich Bolz wrote: >> 2. More fundamentally (and this is where I think you have missed a detail >> about the JIT so far) the JIT ist trace-based. The JIT backends cannot deal >

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-19 Thread Armin Rigo
Hi Carl Friedrich, On Tue, Sep 18, 2012 at 10:00 PM, Carl Friedrich Bolz wrote: > 2. More fundamentally (and this is where I think you have missed a detail > about the JIT so far) the JIT ist trace-based. The JIT backends cannot deal > with arbitrary control flow, only with linear traces. You

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread Carl Friedrich Bolz
Hi Haael, Cool that you want to work on PyPy! haael wrote: >> >> Why would it reduce the size of the binary? > > >That is my poor understanding, I might be wrong. > >In the current approach in a binary there is a compiled machine code, >the flow >graph representation and the JIT compiler. I t

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread Armin Rigo
Hi Haael, Here is again a high-level overview. Although we use the term "backend" for both, there are two completely unrelated components: the JIT backends and the translation backends. The translation backends are part of the static translation of a PyPy (with or without the JIT) to C code. Th

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread Benjamin Peterson
2012/9/18 haael : > OK, so where could I start from? Is there for example some list of flow > graphs opcodes? You can use the graphviewer described in the documentation. > In the current approach in a binary there is a compiled machine code, the > flow graph representation and the JIT compiler. I

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread Benjamin Peterson
2012/9/18 haael : >> 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 b

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread haael
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?

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread Maciej Fijalkowski
On Tue, Sep 18, 2012 at 9:35 AM, haael 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 generato

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-18 Thread haael
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? I

Re: [pypy-dev] Flow graphs, backends and JIT

2012-09-16 Thread Benjamin Peterson
2012/9/16 haael : > > OK, I read almost all the documentation I found on the web page. But I still > don't understand few things. > > There are 3 layers in the whole picture. The user application written in > Python, the Python interpreter written in RPython and the RPython > interpreter itself. >

[pypy-dev] Flow graphs, backends and JIT

2012-09-16 Thread haael
OK, I read almost all the documentation I found on the web page. But I still don't understand few things. There are 3 layers in the whole picture. The user application written in Python, the Python interpreter written in RPython and the RPython interpreter itself. 1. Where do flow graphs a