diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-21 23:08:54 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-21 23:08:54 +0000 |
commit | 9c77efff7733012da96d583a9d037298f7317612 (patch) | |
tree | 4a5af0fdf3986135df36eb2ffebfc49af9eaab2a /gcc/tree-chrec.c | |
parent | 893358f78aabd274a5f60b825899945ae3ea15f3 (diff) | |
download | gcc-9c77efff7733012da96d583a9d037298f7317612.tar.gz |
2007-05-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31995
* tree-chrec.c (evolution_function_is_affine_multivariate_p):
Add loopno argument. Use evolution_function_is_invariant_rec_p
instead of evolution_function_is_constant_p.
Update calls to evolution_function_is_affine_multivariate_p.
* tree-chrec.h (evolution_function_is_affine_multivariate_p):
Add loopno argument.
* tree-scalar-evolution.c (gather_chrec_stats): Call
evolution_function_is_affine_multivariate_p with a loop
number of 0.
* tree-data-ref.c (analyze_miv_subscript): Likewise.
(analyze_overlapping_iterations): Likewise.
(access_functions_are_affine_or_constant_p):
Likewise.
(build_classic_dist_vector_1): If the access functions
are equal, don't do anything.
2007-05-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31995
* gcc.dg/vect/vect-102a.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124927 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 7abd5ad519f..45bee574f85 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -987,7 +987,7 @@ evolution_function_is_invariant_p (tree chrec, int loopnum) evolution. */ bool -evolution_function_is_affine_multivariate_p (tree chrec) +evolution_function_is_affine_multivariate_p (tree chrec, int loopnum) { if (chrec == NULL_TREE) return false; @@ -995,9 +995,9 @@ evolution_function_is_affine_multivariate_p (tree chrec) switch (TREE_CODE (chrec)) { case POLYNOMIAL_CHREC: - if (evolution_function_is_constant_p (CHREC_LEFT (chrec))) + if (evolution_function_is_invariant_rec_p (CHREC_LEFT (chrec), loopnum)) { - if (evolution_function_is_constant_p (CHREC_RIGHT (chrec))) + if (evolution_function_is_invariant_rec_p (CHREC_RIGHT (chrec), loopnum)) return true; else { @@ -1005,7 +1005,7 @@ evolution_function_is_affine_multivariate_p (tree chrec) && CHREC_VARIABLE (CHREC_RIGHT (chrec)) != CHREC_VARIABLE (chrec) && evolution_function_is_affine_multivariate_p - (CHREC_RIGHT (chrec))) + (CHREC_RIGHT (chrec), loopnum)) return true; else return false; @@ -1013,11 +1013,11 @@ evolution_function_is_affine_multivariate_p (tree chrec) } else { - if (evolution_function_is_constant_p (CHREC_RIGHT (chrec)) + if (evolution_function_is_invariant_rec_p (CHREC_RIGHT (chrec), loopnum) && TREE_CODE (CHREC_LEFT (chrec)) == POLYNOMIAL_CHREC && CHREC_VARIABLE (CHREC_LEFT (chrec)) != CHREC_VARIABLE (chrec) && evolution_function_is_affine_multivariate_p - (CHREC_LEFT (chrec))) + (CHREC_LEFT (chrec), loopnum)) return true; else return false; |