[pypy-commit] pypy default: Since alias tracking is killed the name of the imported box among the label arguments will be the name from the previous part, so we need to place the same_as after the label now. This fixes the test in fff6b491e07d.

hakanardo noreply at buildbot.pypy.org
Mon Dec 26 11:40:40 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: 
Changeset: r50868:660488a0ae41
Date: 2011-12-26 11:40 +0100
http://bitbucket.org/pypy/pypy/changeset/660488a0ae41/

Log:	Since alias tracking is killed the name of the imported box among
	the label arguments will be the name from the previous part, so we
	need to place the same_as after the label now. This fixes the test
	in fff6b491e07d.

diff --git a/pypy/jit/metainterp/optimizeopt/test/test_multilabel.py b/pypy/jit/metainterp/optimizeopt/test/test_multilabel.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_multilabel.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_multilabel.py
@@ -424,10 +424,10 @@
         expected = """
         [p1]
         i1 = strlen(p1)
+        label(p1, i1)
         i11 = same_as(i1)
-        label(p1, i11)
         i2 = int_add(i11, 7)
-        jump(p1)
+        jump(p1, i11)
         """
         self.optimize_loop(ops, expected)
 
diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py b/pypy/jit/metainterp/optimizeopt/unroll.py
--- a/pypy/jit/metainterp/optimizeopt/unroll.py
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py
@@ -269,10 +269,8 @@
                 # in case it does, we would prefer to be suboptimal in asm
                 # to a fatal RPython exception.
                 if newresult is not op.result and not newvalue.is_constant():
-                    # XXX fix me?
-                    #self.short_boxes.alias(newresult, op.result)
                     op = ResOperation(rop.SAME_AS, [op.result], newresult)
-                    self.optimizer._newoperations = [op] + self.optimizer._newoperations
+                    self.optimizer._newoperations.append(op)
         self.optimizer.flush()
         self.optimizer.emitting_dissabled = False
 


More information about the pypy-commit mailing list