Author: Richard Plangger <[email protected]>
Branch: release-5.x
Changeset: r83315:30178fbdc748
Date: 2016-03-01 08:32 +0100
http://bitbucket.org/pypy/pypy/changeset/30178fbdc748/
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
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit