Author: Armin Rigo <[email protected]>
Branch:
Changeset: r79475:9b332571db85
Date: 2015-09-06 13:56 +0200
http://bitbucket.org/pypy/pypy/changeset/9b332571db85/
Log: Re-enable this optimization in the arm backend
diff --git a/rpython/jit/backend/arm/regalloc.py
b/rpython/jit/backend/arm/regalloc.py
--- a/rpython/jit/backend/arm/regalloc.py
+++ b/rpython/jit/backend/arm/regalloc.py
@@ -760,7 +760,6 @@
# optimization only: fill in the 'hint_frame_locations' dictionary
# of rm and xrm based on the JUMP at the end of the loop, by looking
# at where we would like the boxes to be after the jump.
- return # XXX disabled for now
op = operations[-1]
if op.getopnum() != rop.JUMP:
return
@@ -778,16 +777,16 @@
# we would like the boxes to be after the jump.
def _compute_hint_frame_locations_from_descr(self, descr):
- return
- #arglocs = self.assembler.target_arglocs(descr)
- #jump_op = self.final_jump_op
- #assert len(arglocs) == jump_op.numargs()
- #for i in range(jump_op.numargs()):
- # box = jump_op.getarg(i)
- # if isinstance(box, Box):
- # loc = arglocs[i]
- # if loc is not None and loc.is_stack():
- # self.frame_manager.hint_frame_locations[box] = loc
+ arglocs = self.assembler.target_arglocs(descr)
+ jump_op = self.final_jump_op
+ assert len(arglocs) == jump_op.numargs()
+ for i in range(jump_op.numargs()):
+ box = jump_op.getarg(i)
+ if isinstance(box, Box):
+ loc = arglocs[i]
+ if loc is not None and loc.is_stack():
+ self.frame_manager.hint_frame_pos[box] = (
+ self.fm.get_loc_index(loc))
def prepare_op_jump(self, op, fcond):
assert self.jump_target_descr is None
@@ -1218,9 +1217,9 @@
# end of the same loop, i.e. if what we are compiling is a single
# loop that ends up jumping to this LABEL, then we can now provide
# the hints about the expected position of the spilled variables.
- #jump_op = self.final_jump_op
- #if jump_op is not None and jump_op.getdescr() is descr:
- # self._compute_hint_frame_locations_from_descr(descr)
+ jump_op = self.final_jump_op
+ if jump_op is not None and jump_op.getdescr() is descr:
+ self._compute_hint_frame_locations_from_descr(descr)
return []
def prepare_op_guard_not_forced_2(self, op, fcond):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit