diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-27 23:28:46 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-27 23:28:46 +0000 |
commit | 793a0ab5898b9f00002cd02e4235f9a6e1fbe3a6 (patch) | |
tree | 0216165e214b4aecd783ed93348bd6396edb33ee /gcc/tree-ssa-loop-ivcanon.c | |
parent | be626f5b2e97a72ec21214c6d2568f947a34a714 (diff) | |
download | gcc-793a0ab5898b9f00002cd02e4235f9a6e1fbe3a6.tar.gz |
2010-02-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43186
* params.def (PARAM_MAX_UNROLL_ITERATIONS): New param.
* doc/invoke.texi (max-completely-peel-loop-nest-depth): Document.
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Limit
unroller iterations.
* gcc.c-torture/compile/pr43186.c: Adjust testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index df48dfd2bc8..e9841f5006f 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -522,6 +522,7 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer) struct loop *loop; bool changed; enum unroll_level ul; + int iteration = 0; do { @@ -554,7 +555,8 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer) scev_reset (); } } - while (changed); + while (changed + && ++iteration <= PARAM_VALUE (PARAM_MAX_UNROLL_ITERATIONS)); return 0; } |