Author: Richard Plangger <planri...@gmail.com> Branch: memop-simplify3 Changeset: r82623:6f7d32f89861 Date: 2016-03-01 08:32 +0100 http://bitbucket.org/pypy/pypy/changeset/6f7d32f89861/
Log: calculate index value (const scale, const offset) before emiting the load for ConstPtrs diff --git a/rpython/jit/backend/llsupport/gc.py b/rpython/jit/backend/llsupport/gc.py --- a/rpython/jit/backend/llsupport/gc.py +++ b/rpython/jit/backend/llsupport/gc.py @@ -164,13 +164,11 @@ array_index = moving_obj_tracker.get_array_index(v) size, offset, _ = unpack_arraydescr(moving_obj_tracker.ptr_array_descr) - scale = size + array_index = array_index * size + offset args = [moving_obj_tracker.const_ptr_gcref_array, ConstInt(array_index), - ConstInt(scale), - ConstInt(offset), ConstInt(size)] - load_op = ResOperation(rop.GC_LOAD_INDEXED_R, args) + load_op = ResOperation(rop.GC_LOAD_R, args) newops.append(load_op) op.setarg(arg_i, load_op) # _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit