re PR middle-end/90726 (exponential behavior on SCEV results everywhere)
authorRichard Biener <rguenther@suse.de>
Tue, 4 Jun 2019 09:05:10 +0000 (09:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 4 Jun 2019 09:05:10 +0000 (09:05 +0000)
commit5fd8a9cb5b0e95af7f833f8dfe62ce5b9d435846
tree3b5d284dec65e1db933d98245b02d38df7414bff
parentd62887a42bc49963179b0429f6914b050dd2517c
re PR middle-end/90726 (exponential behavior on SCEV results everywhere)

2019-06-04  Richard Biener  <rguenther@suse.de>

PR middle-end/90726
* tree-chrec.c (chrec_contains_symbols): Add to visited.
(tree_contains_chrecs): Likewise.
(chrec_contains_symbols_defined_in_loop): Move here and avoid
exponential behaivor from ...
* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
... here.
(expression_expensive_p): Avoid exponential behavior and compute
expanded size, rejecting any expansion.
* tree-ssa-loop-ivopts.c (abnormal_ssa_name_p): Remove.
(idx_contains_abnormal_ssa_name_p): Likewise.
(contains_abnormal_ssa_name_p_1): New helper for walk_tree.
(contains_abnormal_ssa_name_p): Simplify and use
walk_tree_without_duplicates.

* gcc.dg/pr90726.c: New testcase.

From-SVN: r271903
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr90726.c [new file with mode: 0644]
gcc/tree-chrec.c
gcc/tree-scalar-evolution.c
gcc/tree-ssa-loop-ivopts.c