diff options
author | Richard Guenther <rguenther@suse.de> | 2009-06-17 10:26:24 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-06-17 10:26:24 +0000 |
commit | 3cb8677cc030b145391ac547f159609b03dbbd6c (patch) | |
tree | 6565fa35aaddaec6451161a08051d6b81e16a68d /gcc/tree-chrec.h | |
parent | d81b4c614be057ac515828a6b7a92745a542c551 (diff) | |
download | gcc-3cb8677cc030b145391ac547f159609b03dbbd6c.zip gcc-3cb8677cc030b145391ac547f159609b03dbbd6c.tar.gz gcc-3cb8677cc030b145391ac547f159609b03dbbd6c.tar.bz2 |
re PR middle-end/40460 (Enormous memory usage during compilation with -O2 or -O3 optimizations.)
2009-06-17 Richard Guenther <rguenther@suse.de>
PR middle-end/40460
* tree-chrec.h (build_polynomial_chrec): If we cannot determine
if there is no evolution of left in the loop bail out.
* tree-chrec.c (chrec_fold_multiply_poly_poly): CSE one
chrec_fold_multiply.
* g++.dg/torture/pr40460.C: New testcase.
From-SVN: r148593
Diffstat (limited to 'gcc/tree-chrec.h')
-rw-r--r-- | gcc/tree-chrec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-chrec.h b/gcc/tree-chrec.h index 76c24b3..db45eed 100644 --- a/gcc/tree-chrec.h +++ b/gcc/tree-chrec.h @@ -132,7 +132,8 @@ build_polynomial_chrec (unsigned loop_num, || right == chrec_dont_know) return chrec_dont_know; - if (no_evolution_in_loop_p (left, loop_num, &val) && !val) + if (!no_evolution_in_loop_p (left, loop_num, &val) + || !val) return chrec_dont_know; /* Pointer types should occur only on the left hand side, i.e. in |