summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-21 10:22:08 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-21 10:22:08 +0000
commita974c7bca6bd8c03e80352f78d24cc16e0c7a89f (patch)
treeb15c1763048612d704581def55d54de152a96bf1 /gcc/tree-ssa-loop-niter.c
parenta8f6ad2be39381e0f8c65864c492bc0118b5b1af (diff)
downloadgcc-a974c7bca6bd8c03e80352f78d24cc16e0c7a89f.tar.gz
2009-06-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38729 * tree-ssa-loop-niter.c (find_loop_niter_by_eval): Restrict to loops with a single exit if -fno-expensive-optimizations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 18fd6b26e4a..48016c0b7f5 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2254,6 +2254,12 @@ find_loop_niter_by_eval (struct loop *loop, edge *exit)
tree niter = NULL_TREE, aniter;
*exit = NULL;
+
+ /* Loops with multiple exits are expensive to handle and less important. */
+ if (!flag_expensive_optimizations
+ && VEC_length (edge, exits) > 1)
+ return chrec_dont_know;
+
for (i = 0; VEC_iterate (edge, exits, i, ex); i++)
{
if (!just_once_each_iteration_p (loop, ex->src))