[pypy-svn] pypy arm-backend-2: Do not generate instructions for operations without side effects and an unused result
bivab
commits-noreply at bitbucket.org
Fri Jan 14 12:55:44 CET 2011
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r40666:e0fa01427ac3
Date: 2011-01-14 11:55 +0100
http://bitbucket.org/pypy/pypy/changeset/e0fa01427ac3/
Log: Do not generate instructions for operations without side effects and
an unused result
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
@@ -465,7 +465,11 @@
regalloc.position = i
op = operations[i]
opnum = op.getopnum()
- if self.can_merge_with_next_guard(op, i, operations):
+ if op.has_no_side_effect() and op.result not in regalloc.longevity:
+ i += 1
+ regalloc.possibly_free_vars_for_op(op)
+ continue
+ elif self.can_merge_with_next_guard(op, i, operations):
arglocs = regalloc.operations_with_guard[opnum](regalloc, op,
operations[i+1], fcond)
fcond = self.operations_with_guard[opnum](self, op,
More information about the Pypy-commit
mailing list