[pypy-dev] Virtualizables in RPython
Armin Rigo
arigo at tunes.org
Sat Apr 26 09:10:41 CEST 2014
Hi Anton,
On 24 April 2014 12:38, Anton Gulenko
<anton.gulenko at student.hpi.uni-potsdam.de> wrote:
> appreciate your input. I want to collect details about the underlying
> concept, and also about the specific implementation in the RPython JIT. For
> example, was this concept first introduced in Pypy, or is it an older idea?
> How exactly does the optimizer decide which objects can be virtualized, and
> which can not?
We first need to clarify some details. Are you talking about
"virtualizables", or "virtuals"? These are two very different
concepts. The latter is a very strong form of escape analysis, and
probably the single most efficient concept we have in the RPython JIT.
The former, on the other hand, is more of a hack that was added at
some point in time, and that we're trying to remove --- unsuccessfully
so far, because it gives slighty better results than virtuals only,
for the specific use case where it works.
I'm unsure which one you're talking about: only the frame object is a
"virtualizable", and it's not the job of the optimizer to decide that;
it's explicitly marked in the jitdriver. See
https://pypy.readthedocs.org/en/latest/jit/virtualizable.html . On
the other hand, if you're talking about "virtuals", then indeed we
have code in the optimizer to handle them. It's some kind of escape
analysis leading to allocation removal.
A bientôt,
Armin.
More information about the pypy-dev
mailing list