Commits

David Schneider committed 3c3e3de

import changes to compute_vars_longevity from default

Comments (0)

Files changed (1)

pypy/jit/backend/llsupport/regalloc.py

     last_used = {}
     for i in range(len(operations)-1, -1, -1):
         op = operations[i]
+        if op.result:
+            if op.result not in last_used and op.has_no_side_effect():
+                continue
+            assert op.result not in produced
+            produced[op.result] = i
         for j in range(op.numargs()):
             arg = op.getarg(j)
             if isinstance(arg, Box) and arg not in last_used:
                 assert isinstance(arg, Box)
                 if arg not in last_used:
                     last_used[arg] = i
-        if op.result:
-            if op.result not in last_used and op.has_no_side_effect():
-                continue
-            assert op.result not in produced
-            produced[op.result] = i
-
+                    
     longevity = {}
     for arg in produced:
         if arg in last_used: