[pypy-commit] pypy small-unroll-improvements: move the guard generation really directly before the JUMP (there was other

cfbolz noreply at buildbot.pypy.org
Sat Apr 5 19:18:44 CEST 2014


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: small-unroll-improvements
Changeset: r70472:044fb52caa93
Date: 2014-04-05 19:17 +0200
http://bitbucket.org/pypy/pypy/changeset/044fb52caa93/

Log:	move the guard generation really directly before the JUMP (there was
	other stuff generated in between in some cases, which caused the
	remaining test failures)

diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -1049,7 +1049,6 @@
             # much less expensive to blackhole out of.
             saved_pc = self.pc
             self.pc = orgpc
-            self.metainterp.generate_guard(rop.GUARD_FUTURE_CONDITION, resumepc=orgpc)
             self.metainterp.reached_loop_header(greenboxes, redboxes)
             self.pc = saved_pc
             # no exception, which means that the jit_merge_point did not
@@ -2075,7 +2074,11 @@
                                               duplicates)
             live_arg_boxes += self.virtualizable_boxes
             live_arg_boxes.pop()
-        #
+
+        # generate a dummy guard just before the JUMP so that unroll can use it
+        # when it's creating artificial guards.
+        self.generate_guard(rop.GUARD_FUTURE_CONDITION)
+
         assert len(self.virtualref_boxes) == 0, "missing virtual_ref_finish()?"
         # Called whenever we reach the 'loop_header' hint.
         # First, attempt to make a bridge:


More information about the pypy-commit mailing list