[pypy-dev] Flow graphs, backends and JIT

Armin Rigo arigo at tunes.org
Wed Sep 19 11:38:21 CEST 2012


Hi Carl Friedrich,

On Tue, Sep 18, 2012 at 10:00 PM, Carl Friedrich Bolz <cfbolz at gmx.de> 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 missed an intermediate solution: have the JIT's blackhole
interpreter run the jitcodes before warm-up.  We don't have to
actually JIT-compile everything before being able to run it, which
would indeed completely kill warm-up times.  This would give a (slow
but not unreasonably slow) solution: a very general "RPython
interpreter and JIT-compiler" that would input and run some set of
serialized jitcodes --- similar to a Java VM, actually.  (There are
tons of minor issues ahead, like all the stranger operations that
don't have a jitcode equivalent so far, e.g. working on "long double"
or "long long long" or weakrefs...)

Note that in order to make the "RPython interpreter and JIT-compiler"
itself, we would need to translate regular RPython code --- which
means it doesn't help at all if the goal is to port RPython to non-C
translation targets.  It's merely a cool hack, and maybe a debugging
help to trade fast translation time for a slower result.


A bientôt,

Armin.


More information about the pypy-dev mailing list