Author: David Schneider <[email protected]>
Branch: arm-backend-2
Changeset: r49615:2771f3c2a471
Date: 2011-11-21 12:04 +0100
http://bitbucket.org/pypy/pypy/changeset/2771f3c2a471/
Log: Updating the position of the regalloc to soon when merging
operations with the following guard leads to some vars being freed
to early
diff --git a/pypy/jit/backend/arm/assembler.py
b/pypy/jit/backend/arm/assembler.py
--- a/pypy/jit/backend/arm/assembler.py
+++ b/pypy/jit/backend/arm/assembler.py
@@ -794,12 +794,13 @@
if op.has_no_side_effect() and op.result not in regalloc.longevity:
regalloc.possibly_free_vars_for_op(op)
elif self.can_merge_with_next_guard(op, i, operations):
+ guard = operations[i+1]
+ assert guard.is_guard()
+ arglocs = regalloc_operations_with_guard[opnum](regalloc, op,
+ guard, fcond)
+ fcond = asm_operations_with_guard[opnum](self, op,
+ guard, arglocs, regalloc, fcond)
regalloc.next_instruction()
- arglocs = regalloc_operations_with_guard[opnum](regalloc, op,
- operations[i+1], fcond)
- fcond = asm_operations_with_guard[opnum](self, op,
- operations[i+1], arglocs, regalloc,
fcond)
- guard = operations[i+1]
regalloc.possibly_free_vars_for_op(guard)
regalloc.possibly_free_vars(guard.getfailargs())
elif not we_are_translated() and op.getopnum() == -124:
diff --git a/pypy/jit/backend/arm/helper/regalloc.py
b/pypy/jit/backend/arm/helper/regalloc.py
--- a/pypy/jit/backend/arm/helper/regalloc.py
+++ b/pypy/jit/backend/arm/helper/regalloc.py
@@ -132,8 +132,7 @@
res = self.force_allocate_reg(op.result, [a0])
return [reg, res]
else:
- args = self._prepare_guard(guard_op, [reg])
- return args
+ return self._prepare_guard(guard_op, [reg])
if name:
f.__name__ = name
return f
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit