diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-09 13:48:05 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-09 13:48:05 +0000 |
commit | 2838513a2cbe3dabed7f5e5e229099de9618833d (patch) | |
tree | c6c4257bc6daf8e297d1d5763c98b90120605f30 /gcc/loop-init.c | |
parent | 39b6232eee3cf86162d5a58982017499e0f815eb (diff) | |
download | gcc-2838513a2cbe3dabed7f5e5e229099de9618833d.tar.gz |
2013-03-09 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 196572 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@196574 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index b1954ca484f..f75493817bb 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -186,7 +186,7 @@ fix_loop_structure (bitmap changed_bbs) int record_exits = 0; loop_iterator li; struct loop *loop; - unsigned old_nloops; + unsigned old_nloops, i; timevar_push (TV_LOOP_INIT); @@ -230,8 +230,9 @@ fix_loop_structure (bitmap changed_bbs) flow_loop_tree_node_add (loop_outer (loop), ploop); } - /* Remove the loop and free its data. */ - delete_loop (loop); + /* Remove the loop. */ + loop->header = NULL; + flow_loop_tree_node_remove (loop); } /* Remember the number of loops so we can return how many new loops @@ -253,6 +254,14 @@ fix_loop_structure (bitmap changed_bbs) } } + /* Finally free deleted loops. */ + FOR_EACH_VEC_ELT (*get_loops (), i, loop) + if (loop && loop->header == NULL) + { + (*get_loops ())[i] = NULL; + flow_loop_free (loop); + } + loops_state_clear (LOOPS_NEED_FIXUP); /* Apply flags to loops. */ |