[pypy-commit] pypy stmgc-c7: Merge

Raemi noreply at buildbot.pypy.org
Wed Aug 20 13:02:54 CEST 2014


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: stmgc-c7
Changeset: r72928:24b0a79addbe
Date: 2014-08-20 13:02 +0200
http://bitbucket.org/pypy/pypy/changeset/24b0a79addbe/

Log:	Merge

diff --git a/rpython/jit/backend/llsupport/stmrewrite.py b/rpython/jit/backend/llsupport/stmrewrite.py
--- a/rpython/jit/backend/llsupport/stmrewrite.py
+++ b/rpython/jit/backend/llsupport/stmrewrite.py
@@ -27,6 +27,12 @@
             self._do_stm_call('stm_hint_commit_soon', [], None,
                               op.stm_location)
             return
+        # ----------  jump, finish, guard_not_forced_2  ----------
+        if (opnum == rop.JUMP or opnum == rop.FINISH
+                or opnum == rop.GUARD_NOT_FORCED_2):
+            self.add_dummy_allocation()
+            self.newops.append(op)
+            return
         # ----------  pure operations, guards  ----------
         if op.is_always_pure() or op.is_guard() or op.is_ovf():
             self.newops.append(op)
@@ -84,11 +90,6 @@
                      ):
             self.newops.append(op)
             return
-        # ----------  jump, finish  ----------
-        if opnum == rop.JUMP or opnum == rop.FINISH:
-            self.add_dummy_allocation()
-            self.newops.append(op)
-            return
         # ----------  fall-back  ----------
         # Check that none of the ops handled here can collect.
         # This is not done by the fallback here
diff --git a/rpython/jit/backend/llsupport/test/test_stmrewrite.py b/rpython/jit/backend/llsupport/test/test_stmrewrite.py
--- a/rpython/jit/backend/llsupport/test/test_stmrewrite.py
+++ b/rpython/jit/backend/llsupport/test/test_stmrewrite.py
@@ -1322,3 +1322,18 @@
         $DUMMYALLOC
         jump(i1)
         """)
+
+    def test_dummy_alloc_is_before_guard_not_forced_2(self):
+        self.check_rewrite("""
+        []
+        escape()
+        guard_not_forced_2() []
+        finish()
+        """, """
+        []
+        $INEV
+        escape()
+        $DUMMYALLOC
+        guard_not_forced_2() []
+        finish()
+        """)


More information about the pypy-commit mailing list