[pypy-commit] pypy regalloc-playground: cleanup

cfbolz pypy.commits at gmail.com
Tue Sep 5 15:44:45 EDT 2017


Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: regalloc-playground
Changeset: r92321:5d156f96018b
Date: 2017-09-03 09:28 +0200
http://bitbucket.org/pypy/pypy/changeset/5d156f96018b/

Log:	cleanup

diff --git a/rpython/jit/backend/x86/reghint.py b/rpython/jit/backend/x86/reghint.py
--- a/rpython/jit/backend/x86/reghint.py
+++ b/rpython/jit/backend/x86/reghint.py
@@ -36,9 +36,8 @@
         x = op.getarg(0)
         y = op.getarg(1)
 
-        # For symmetrical operations, if 'y' is already in a register
-        # and won't be used after the current operation finishes,
-        # then swap the role of 'x' and 'y'
+        # For symmetrical operations, if y won't be used after the current
+        # operation finishes, but x will be, then swap the role of 'x' and 'y'
         if (self.longevity[x].last_usage > position and
                 self.longevity[y].last_usage == position):
             x, y = y, x
@@ -59,11 +58,6 @@
     consider_int_sub_ovf = _consider_binop
     consider_int_add_ovf = _consider_binop_symm
 
-    def _consider_lea(self, op, loc):
-        argloc = self.loc(op.getarg(1))
-        resloc = self.force_allocate_reg(op)
-        self.perform(op, [loc, argloc], resloc)
-
     def consider_int_add(self, op, position):
         y = op.getarg(1)
         if isinstance(y, ConstInt) and rx86.fits_in_32bits(y.value):
@@ -76,7 +70,7 @@
     def consider_int_lshift(self, op, position):
         x, y = op.getarg(0), op.getarg(1)
         if not isinstance(y, Const):
-            self.longevity.fixed_register(position, ecx, op.getarg(1))
+            self.longevity.fixed_register(position, ecx, y)
         if not isinstance(x, Const):
             self.longevity.try_use_same_register(x, op)
 


More information about the pypy-commit mailing list