diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-20 11:09:16 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-20 11:09:16 +0000 |
commit | b811afb0df17c2de8ea2ea78c002e48f4606d6dd (patch) | |
tree | 90c7593e6e12d11084f0ca47062016f232b3612f /gcc/cfgloop.c | |
parent | 102b6538abc58c07877d2b9477268df4f72ca9eb (diff) | |
download | gcc-b811afb0df17c2de8ea2ea78c002e48f4606d6dd.tar.gz |
PR middle-end/19698
* function.h (struct function): New field `max_loop_depth'.
* cfgloop.c (establish_preds): Update maximum loop depth seen so far.
(flow_loops_find): Reset the max loop depth count before finding loops.
* flow.c (MAX_LIVENESS_ROUNDS): New constant.
(update_life_info_in_dirty_blocks): Remove 2002-05-28 workaround.
(calculate_global_regs_live): Make sure the loop will terminate
when the initial sets are not empty.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 4fb687c1ab6..40a6de489cc 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "rtl.h" #include "hard-reg-set.h" #include "obstack.h" +#include "function.h" #include "basic-block.h" #include "toplev.h" #include "cfgloop.h" @@ -510,6 +511,10 @@ establish_preds (struct loop *loop) struct loop *ploop, *father = loop->outer; loop->depth = father->depth + 1; + + /* Remember the current loop depth if it is the largest seen so far. */ + cfun->max_loop_depth = MAX (cfun->max_loop_depth, loop->depth); + if (loop->pred) free (loop->pred); loop->pred = xmalloc (sizeof (struct loop *) * loop->depth); @@ -819,6 +824,10 @@ flow_loops_find (struct loops *loops, int flags) memset (loops, 0, sizeof *loops); + /* We are going to recount the maximum loop depth, + so throw away the last count. */ + cfun->max_loop_depth = 0; + /* Taking care of this degenerate case makes the rest of this code simpler. */ if (n_basic_blocks == 0) @@ -1213,7 +1222,7 @@ remove_bb_from_loops (basic_block bb) loop->pred[i]->num_nodes--; bb->loop_father = NULL; bb->loop_depth = 0; - } +} /* Finds nearest common ancestor in loop tree for given loops. */ struct loop * |