Author: Carl Friedrich Bolz <[email protected]>
Branch: regalloc-playground
Changeset: r92215:358d42ebcdea
Date: 2017-08-23 07:04 +0200
http://bitbucket.org/pypy/pypy/changeset/358d42ebcdea/
Log: a test about the remaining case, and a comment
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
@@ -700,6 +700,7 @@
if len(move_or_spill) > 0:
while len(self.free_regs) > 0:
+ # YYY here we need to use the new information to pick stuff
new_reg = self.free_regs.pop()
if new_reg in self.save_around_call_regs:
new_free_regs.append(new_reg) # not this register...
diff --git a/rpython/jit/backend/llsupport/test/test_regalloc.py
b/rpython/jit/backend/llsupport/test/test_regalloc.py
--- a/rpython/jit/backend/llsupport/test/test_regalloc.py
+++ b/rpython/jit/backend/llsupport/test/test_regalloc.py
@@ -292,6 +292,11 @@
loc = longevity.try_pick_free_reg(0, b4, [r5, r2, r3, r4, r1])
assert loc in [r4, r5]
+ # all available are fixed but var doesn't fit completely into any of these.
+ # pick the biggest interval
+ loc = longevity.try_pick_free_reg(0, b4, [r1, r2, r3])
+ assert loc is r3
+
class TestRegalloc(object):
def test_freeing_vars(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit