[pypy-svn] pypy jit-virtual_state: We never want to produce a second preamble as it will replace the first as entrybridge. This will produce a loop which would never get called. I guess the gc will kill it eventually but an optimization would be to never send it to the backend.
hakanardo
commits-noreply at bitbucket.org
Tue Feb 8 18:31:07 CET 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-virtual_state
Changeset: r41703:6937cbed65e9
Date: 2011-02-08 18:30 +0100
http://bitbucket.org/pypy/pypy/changeset/6937cbed65e9/
Log: We never want to produce a second preamble as it will replace the
first as entrybridge. This will produce a loop which would never get
called. I guess the gc will kill it eventually but an optimization
would be to never send it to the backend.
diff --git a/pypy/jit/metainterp/test/test_basic.py b/pypy/jit/metainterp/test/test_basic.py
--- a/pypy/jit/metainterp/test/test_basic.py
+++ b/pypy/jit/metainterp/test/test_basic.py
@@ -1918,8 +1918,8 @@
return a1.val + b1.val
res = self.meta_interp(g, [6, 14])
assert res == g(6, 14)
- self.check_loop_count(11)
- self.check_loops(getarrayitem_gc=17, everywhere=True)
+ self.check_loop_count(9)
+ self.check_loops(getarrayitem_gc=6, everywhere=True)
def test_multiple_specialied_versions_bridge(self):
myjitdriver = JitDriver(greens = [], reds = ['y', 'x', 'z', 'res'])
diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -117,7 +117,7 @@
send_loop_to_backend(metainterp_sd, loop, "loop")
record_loop_or_bridge(metainterp_sd, loop)
token = loop.preamble.token
- if full_preamble_needed or not loop.preamble.token.short_preamble:
+ if full_preamble_needed:
send_loop_to_backend(metainterp_sd, loop.preamble, "entry bridge")
insert_loop_token(old_loop_tokens, loop.preamble.token)
jitdriver_sd.warmstate.attach_unoptimized_bridge_from_interp(
More information about the Pypy-commit
mailing list