[pypy-commit] pypy jit-targets: Subtle fix. Used to show up in test_loop_unroll occasionally.

arigo noreply at buildbot.pypy.org
Thu Nov 24 13:42:58 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-targets
Changeset: r49721:10f20488e230
Date: 2011-11-24 13:42 +0100
http://bitbucket.org/pypy/pypy/changeset/10f20488e230/

Log:	Subtle fix. Used to show up in test_loop_unroll occasionally.

diff --git a/pypy/jit/backend/llsupport/regalloc.py b/pypy/jit/backend/llsupport/regalloc.py
--- a/pypy/jit/backend/llsupport/regalloc.py
+++ b/pypy/jit/backend/llsupport/regalloc.py
@@ -37,6 +37,9 @@
         self.frame_depth += size
         return newloc
 
+    def forget_frame_allocation(self, box):
+        self.frame_bindings.pop(box, None)
+
     def reserve_location_in_frame(self, size):
         frame_depth = self.frame_depth
         self.frame_depth += size
diff --git a/pypy/jit/backend/x86/regalloc.py b/pypy/jit/backend/x86/regalloc.py
--- a/pypy/jit/backend/x86/regalloc.py
+++ b/pypy/jit/backend/x86/regalloc.py
@@ -1417,6 +1417,8 @@
                 floatlocs[i] = loc
             else:
                 nonfloatlocs[i] = loc
+            if isinstance(loc, RegLoc):
+                self.fm.forget_frame_allocation(arg)
         descr._x86_arglocs = nonfloatlocs, floatlocs
         descr._x86_loop_code = self.assembler.mc.get_relative_pos()
         descr._x86_clt = self.assembler.current_clt


More information about the pypy-commit mailing list