2010-06-09 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (gather_memory_references_ref):
Do not the gather memory reference in the outer loop if the step
is not a constant.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160515
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-09 Changpeng Fang <changpeng.fang@amd.com>
+
+ * tree-ssa-loop-prefetch.c (gather_memory_references_ref):
+ Do not the gather memory reference in the outer loop if the step
+ is not a constant.
+
2010-06-09 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO) :
if (step == NULL_TREE)
return false;
+ /* Limit non-constant step prefetching only to the innermost loops. */
+ if (!cst_and_fits_in_hwi (step) && loop->inner != NULL)
+ return false;
+
/* Now we know that REF = &BASE + STEP * iter + DELTA, where DELTA and STEP
are integer constants. */
agrp = find_or_create_group (refs, base, step);