[pypy-svn] pypy arm-backend-2: Move check for operation result down to compute correct longevities even in case of ignored operation results
bivab
commits-noreply at bitbucket.org
Fri Jan 14 12:55:45 CET 2011
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r40667:5903949b2f63
Date: 2011-01-14 12:54 +0100
http://bitbucket.org/pypy/pypy/changeset/5903949b2f63/
Log: Move check for operation result down to compute correct longevities
even in case of ignored operation results
diff --git a/pypy/jit/backend/llsupport/regalloc.py b/pypy/jit/backend/llsupport/regalloc.py
--- a/pypy/jit/backend/llsupport/regalloc.py
+++ b/pypy/jit/backend/llsupport/regalloc.py
@@ -357,11 +357,6 @@
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:
@@ -373,6 +368,11 @@
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:
More information about the Pypy-commit
mailing list