aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-21 11:59:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-21 11:59:28 +0000
commit4a61be9acc1e0a4d0258f47da59a1463a0e59b8d (patch)
tree64fa28fa235f357870ff62e9ba5ee14e9f7713ad /gcc/tree-ssa-loop-ivcanon.c
parentc52da5f7d36d279d829adf384271c53e1ce87601 (diff)
downloadgcc-4a61be9acc1e0a4d0258f47da59a1463a0e59b8d.zip
gcc-4a61be9acc1e0a4d0258f47da59a1463a0e59b8d.tar.gz
gcc-4a61be9acc1e0a4d0258f47da59a1463a0e59b8d.tar.bz2
re PR tree-optimization/57318 (optimizer takes several seconds on nested loops)
2013-05-21 Richard Biener <rguenther@suse.de> PR tree-optimization/57318 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Do not estimate stmts with side-effects as likely eliminated. From-SVN: r199140
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index b5751cb..45774e6 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -257,8 +257,10 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, stru
/* Look for reasons why we might optimize this stmt away. */
+ if (gimple_has_side_effects (stmt))
+ ;
/* Exit conditional. */
- if (exit && body[i] == exit->src
+ else if (exit && body[i] == exit->src
&& stmt == last_stmt (exit->src))
{
if (dump_file && (dump_flags & TDF_DETAILS))