Author: Hakan Ardo <[email protected]>
Branch: jit-usable_retrace_2
Changeset: r51015:5bf961464624
Date: 2012-01-04 11:16 +0100
http://bitbucket.org/pypy/pypy/changeset/5bf961464624/

Log:    debugging

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
@@ -146,9 +146,11 @@
     def generalize_state(self, start_label, stop_label):
         if self.jump_to_start_label(start_label, stop_label):
             # At the end of the preamble, don't generalize much
+            debug_print('Generalize preamble')
             KillHugeIntBounds(self.optimizer).apply()
         else:
             # At the end of a bridge about to force a retrcae
+            debug_print('Generalize for retrace')
             KillIntBounds(self.optimizer).apply()
             self.optimizer.kill_consts_at_end_of_preamble = True
 
@@ -184,6 +186,9 @@
 
         modifier = VirtualStateAdder(self.optimizer)
         virtual_state = modifier.get_virtual_state(jump_args)
+        debug_start('jit-log-virtualstate')
+        virtual_state.debug_print('Exporting ')
+        debug_stop('jit-log-virtualstate')        
             
         values = [self.getvalue(arg) for arg in jump_args]
         inputargs = virtual_state.make_inputargs(values, self.optimizer)
diff --git a/pypy/module/pypyjit/test_pypy_c/test_misc.py 
b/pypy/module/pypyjit/test_pypy_c/test_misc.py
--- a/pypy/module/pypyjit/test_pypy_c/test_misc.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_misc.py
@@ -22,6 +22,7 @@
         # "i" is virtual. However, in this specific case the two loops happen
         # to contain the very same operations
         loop0, loop1 = log.loops_by_filename(self.filepath)
+        
         expected = """
             i9 = int_le(i7, i8)
             guard_true(i9, descr=...)
@@ -37,7 +38,7 @@
         # XXX: The retracing fails to form a loop since j
         # becomes constant 0 after the bridge and constant 1 at the end of the
         # loop. A bridge back to the peramble is produced instead.        
-        #assert loop1.match(expected)
+        assert loop1.match(expected)
 
     def test_factorial(self):
         def fact(n):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to