[pypy-commit] pypy regalloc-playground: some ideas what to improve

cfbolz pypy.commits at gmail.com
Sun Aug 20 13:09:31 EDT 2017


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: regalloc-playground
Changeset: r92184:beea904fa30e
Date: 2017-08-19 08:59 +0200
http://bitbucket.org/pypy/pypy/changeset/beea904fa30e/

Log:	some ideas what to improve

diff --git a/rpython/jit/backend/llsupport/regalloc.py b/rpython/jit/backend/llsupport/regalloc.py
--- a/rpython/jit/backend/llsupport/regalloc.py
+++ b/rpython/jit/backend/llsupport/regalloc.py
@@ -394,6 +394,7 @@
         try:
             return self.reg_bindings[v]
         except KeyError:
+            # YYY here we should chose the free variable a bit more carefully
             if self.free_regs:
                 loc = self.free_regs.pop()
                 self.reg_bindings[v] = loc
@@ -416,6 +417,8 @@
         """
         cur_max_age = -1
         candidate = None
+        # YYY we should pick a variable to spill that is only used in failargs
+        # from now on
         for next in self.reg_bindings:
             reg = self.reg_bindings[next]
             if next in forbidden_vars:
@@ -528,6 +531,8 @@
         self.reg_bindings[to_v] = reg
 
     def _move_variable_away(self, v, prev_loc):
+        # YYY here we should not move it to another reg, if all uses are in
+        # failargs
         if self.free_regs:
             loc = self.free_regs.pop()
             self.reg_bindings[v] = loc


More information about the pypy-commit mailing list