Commits

David Schneider committed 9c2aca6

Next register allocation fix

Comments (0)

Files changed (2)

pypy/jit/backend/arm/helper/regalloc.py

         arg2 = self.make_sure_var_in_reg(a1, selected_reg=r.r1)
         assert arg1 == r.r0
         assert arg2 == r.r1
-        spilled = False
         if isinstance(a0, Box) and self.stays_alive(a0):
-            spilled = True
             self.force_spill_var(a0)
+        self.possibly_free_var(a0)
         self.after_call(op.result)
-        if spilled:
-            self.possibly_free_var(a0)
         self.possibly_free_var(a1)
         self.possibly_free_var(op.result)
         return []

pypy/jit/backend/arm/regalloc.py

             boxes.append(box)
             l1, box = self._ensure_value_is_boxed(a1, [box])
             boxes.append(box)
-        res = self.force_allocate_reg(op.result, boxes)
         self.possibly_free_vars(boxes)
+        res = self.force_allocate_reg(op.result)
         self.possibly_free_var(op.result)
         return [l0, l1, res]
 
             boxes.append(box)
             l1, box = self._ensure_value_is_boxed(a1, boxes)
             boxes.append(box)
-        res = self.force_allocate_reg(op.result, boxes)
         self.possibly_free_vars(boxes)
+        res = self.force_allocate_reg(op.result)
         self.possibly_free_var(op.result)
         return [l0, l1, res]
 
         reg2, box = self._ensure_value_is_boxed(a1, forbidden_vars=boxes)
         boxes.append(box)
 
-        res = self.force_allocate_reg(op.result, boxes)
         self.possibly_free_vars(boxes)
+        res = self.force_allocate_reg(op.result)
         self.possibly_free_var(op.result)
         return [reg1, reg2, res]
 
 
     def prepare_op_int_neg(self, op, fcond):
         l0, box = self._ensure_value_is_boxed(op.getarg(0))
-        resloc = self.force_allocate_reg(op.result, [box])
-        self.possibly_free_vars([box, op.result])
+        self.possibly_free_var(box)
+        resloc = self.force_allocate_reg(op.result)
+        self.possibly_free_var(op.result)
         return [l0, resloc]
 
     prepare_op_int_invert = prepare_op_int_neg
         base_loc, base_box = self._ensure_value_is_boxed(a0)
         self.possibly_free_var(a0)
         self.possibly_free_var(base_box)
-        res = self.force_allocate_reg(op.result, [a0])
+        res = self.force_allocate_reg(op.result)
         self.possibly_free_var(op.result)
         return [base_loc, imm(ofs), res, imm(size)]
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.