[pypy-commit] [Git][pypy/pypy][branch/py3.6] 15 commits: redo 8fcba04d307f: don't generate tons and tons of guard_not_invalidated while

Carl Friedrich Bolz-Tereick foss at heptapod.net
Wed Feb 26 05:03:28 EST 2020


Carl Friedrich Bolz-Tereick pushed to branch branch/py3.6 at PyPy / pypy


Commits:
35d83d03 by Carl Friedrich Bolz-Tereick at 2020-02-16T15:26:19+01:00
redo 8fcba04d307f: don't generate tons and tons of guard_not_invalidated while
tracing

one benchmark had 43% of all guards be guard_not_invalidated

However, this needs an adaptation in the optimizer, to remove
guard_not_invalidated less aggressively:

we need one guard_not_invalidated after every call that can invalidate
something. This is independent to whether the quasiimmut_field op is removed or
not! The tracer will only trace one guard_not_invalidated after each call, so
even if the first quasiimmut_field is removed, the second one might not be and
could rely on the presence of an earlier guard_not_invalidated. This might
under rare circumstances leave a extra guard_not_invalidated in the trace! But
guard_not_invalidated is cheap, it emits no instructions and its only cost is
the size of the resume data. Therfore that is still a better tradeoff than
capturing resume data for every quasiimmut_field in the front end *all the
time*

--HG--
branch : warmup-improvements-various

- - - - -
fe90f2f7 by Carl Friedrich Bolz-Tereick at 2020-02-16T15:31:21+01:00
this didn't quite work in practice, explicitly don't check the stack depth

--HG--
branch : warmup-improvements-various

- - - - -
12365ef7 by Carl Friedrich Bolz-Tereick at 2020-02-16T16:01:02+01:00
avoid the "ping pong" of the return value on the stack in the most common cases

--HG--
branch : warmup-improvements-various

- - - - -
cbbdf5d5 by Carl Friedrich Bolz-Tereick at 2020-02-16T22:58:58+01:00
fix test

--HG--
branch : warmup-improvements-various

- - - - -
ab78084a by Carl Friedrich Bolz-Tereick at 2020-02-16T23:06:40+01:00
cache result of call_loopinvariant in the heapcache

--HG--
branch : warmup-improvements-various

- - - - -
7bb0b5d9 by Carl Friedrich Bolz-Tereick at 2020-02-17T07:11:39+01:00
more robust caching of quasiimmut_field when applied to *constants* (which is
the common case after all!)

--HG--
branch : warmup-improvements-various

- - - - -
03571504 by Carl Friedrich Bolz-Tereick at 2020-02-17T07:40:17+01:00
when tracing, we know that newly allocated frames must be different from the standard frame

--HG--
branch : warmup-improvements-various

- - - - -
4e810466 by Carl Friedrich Bolz-Tereick at 2020-02-17T13:54:03+01:00
fix a generator corner case

--HG--
branch : warmup-improvements-various

- - - - -
70e14a03 by Carl Friedrich Bolz-Tereick at 2020-02-17T19:54:03+01:00
remove bogus quasi-immutable declaration on the ExecutionContext. the ec is
never constant, so it doesn't help to make its fields quasi-immutable

--HG--
branch : warmup-improvements-various

- - - - -
315d87d0 by Carl Friedrich Bolz-Tereick at 2020-02-21T11:42:16+01:00
fix tests due to changen in guard_not_invalidated

--HG--
branch : warmup-improvements-various

- - - - -
19783278 by Carl Friedrich Bolz-Tereick at 2020-02-22T19:06:18+01:00
merge default

--HG--
branch : warmup-improvements-various

- - - - -
927f1aa0 by Carl Friedrich Bolz-Tereick at 2020-02-23T19:15:50+01:00
merge heads

--HG--
branch : warmup-improvements-various

- - - - -
76eab9a7 by Carl Friedrich Bolz-Tereick at 2020-02-26T10:56:16+01:00
merge warmup-improvements-various:

improve warmup speed of PyPy

- a few minor tweaks in the interpreter
- since tracing guards is super costly, work harder at not emitting
  too many guard_not_invalidated while tracing
- optimize quasi_immut during tracing
- optimize loopinvariant calls during tracing
- a small optimization around non-standard virtualizables during tracing

this improves warmup time by around ~5-20%

- - - - -
5faa0309 by Carl Friedrich Bolz-Tereick at 2020-02-26T10:57:06+01:00
document branch

- - - - -
3f1642ca by Carl Friedrich Bolz-Tereick at 2020-02-26T10:58:04+01:00
merge default

--HG--
branch : py3.6

- - - - -


12 changed files:

- pypy/doc/whatsnew-head.rst
- pypy/interpreter/pyframe.py
- pypy/interpreter/pyopcode.py
- pypy/module/pypyjit/test_pypy_c/test_micronumpy.py
- rpython/jit/metainterp/heapcache.py
- rpython/jit/metainterp/optimizeopt/heap.py
- rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
- rpython/jit/metainterp/pyjitpl.py
- rpython/jit/metainterp/test/test_heapcache.py
- rpython/jit/metainterp/test/test_quasiimmut.py
- rpython/jit/metainterp/test/test_threadlocal.py
- rpython/jit/metainterp/test/test_tracingopts.py


View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/76cfea066db1e2591bd3bc613e611196092d776d...3f1642ca13cebdab3a90f069b9206a54a046a192

---
View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/76cfea066db1e2591bd3bc613e611196092d776d...3f1642ca13cebdab3a90f069b9206a54a046a192
You're receiving this email because of your account on foss.heptapod.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-commit/attachments/20200226/3e4eca87/attachment.html>


More information about the pypy-commit mailing list