aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2008-01-03 02:38:24 +0000
committerSebastian Pop <spop@gcc.gnu.org>2008-01-03 02:38:24 +0000
commit097392de6b7eb5cba34ed8f367ab79837d7cedd2 (patch)
tree7b6ea1945bfbc46843c39712210b90e54ad59129 /gcc/tree-data-ref.c
parent8c7cc333be628a708bac4b59d1745c2c91bdcdc3 (diff)
downloadgcc-097392de6b7eb5cba34ed8f367ab79837d7cedd2.zip
gcc-097392de6b7eb5cba34ed8f367ab79837d7cedd2.tar.gz
gcc-097392de6b7eb5cba34ed8f367ab79837d7cedd2.tar.bz2
re PR tree-optimization/34635 (tree check: expected polynomial_chrec, have integer_cst in add_multivariate_self_dist, at tree-data-ref.c:2813)
2007-12-19 Sebastian Pop <sebastian.pop@amd.com> PR tree-optimization/34635 * tree-data-ref.c (add_other_self_distances): Make sure that the evolution step is constant. * gcc.dg/tree-ssa/pr34635.c: New. * gcc.dg/tree-ssa/pr34635-1.c: New. From-SVN: r131275
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 07b311a..88f6347 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -2818,9 +2818,9 @@ constant_access_functions (const struct data_dependence_relation *ddr)
return true;
}
-
/* Helper function for the case where DDR_A and DDR_B are the same
- multivariate access function. */
+ multivariate access function with a constant step. For an example
+ see pr34635-1.c. */
static void
add_multivariate_self_dist (struct data_dependence_relation *ddr, tree c_2)
@@ -2890,7 +2890,17 @@ add_other_self_distances (struct data_dependence_relation *ddr)
return;
}
- add_multivariate_self_dist (ddr, DR_ACCESS_FN (DDR_A (ddr), 0));
+ access_fun = DR_ACCESS_FN (DDR_A (ddr), 0);
+
+ if (TREE_CODE (CHREC_LEFT (access_fun)) == POLYNOMIAL_CHREC)
+ add_multivariate_self_dist (ddr, access_fun);
+ else
+ /* The evolution step is not constant: it varies in
+ the outer loop, so this cannot be represented by a
+ distance vector. For example in pr34635.c the
+ evolution is {0, +, {0, +, 4}_1}_2. */
+ DDR_AFFINE_P (ddr) = false;
+
return;
}