Hakan Ardo  committed 5bf9614


  • Participants
  • Parent commits 8fc4e9a
  • Branches jit-usable_retrace_2

Comments (0)

Files changed (2)

File pypy/jit/metainterp/optimizeopt/

     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')
             # At the end of a bridge about to force a retrcae
+            debug_print('Generalize for retrace')
             self.optimizer.kill_consts_at_end_of_preamble = True
         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)

File pypy/module/pypyjit/test_pypy_c/

         # "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=...)
         # 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):