Commit 79c3dc5f by Mikael Morin

trans-array.c (gfc_trans_preloop_setup): Unconditionally use the dim array to…

trans-array.c (gfc_trans_preloop_setup): Unconditionally use the dim array to get the stride in the innermost loop.

2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>

	* trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
	dim array to get the stride in the innermost loop.

From-SVN: r164103
parent de8e52f0
2010-09-09 Mikael Morin <mikael@gcc.gnu.org> 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
dim array to get the stride in the innermost loop.
2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_trans_create_temp_array): Don't set dim array. * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
(gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array. (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
* trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto. * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
......
...@@ -2772,16 +2772,17 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag, ...@@ -2772,16 +2772,17 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
info->offset, index); info->offset, index);
info->offset = gfc_evaluate_now (info->offset, pblock); info->offset = gfc_evaluate_now (info->offset, pblock);
} }
i = loop->order[0];
stride = gfc_conv_array_stride (info->descriptor, info->dim[i]);
} }
else
stride = gfc_conv_array_stride (info->descriptor, 0); i = loop->order[0];
/* For the time being, the innermost loop is unconditionally on
the first dimension of the scalarization loop. */
gcc_assert (i == 0);
stride = gfc_conv_array_stride (info->descriptor, info->dim[i]);
/* Calculate the stride of the innermost loop. Hopefully this will /* Calculate the stride of the innermost loop. Hopefully this will
allow the backend optimizers to do their stuff more effectively. allow the backend optimizers to do their stuff more effectively.
*/ */
info->stride0 = gfc_evaluate_now (stride, pblock); info->stride0 = gfc_evaluate_now (stride, pblock);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment