diff options
author | Richard Biener <rguenther@suse.de> | 2014-09-05 09:17:49 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-09-05 09:17:49 +0000 |
commit | 08c13199cf5568393fd46481d99cf1729480548a (patch) | |
tree | 498eb05797e1926e45952564278499d1d7db531b /gcc/tree-ssa-threadupdate.c | |
parent | f65586dcd19846071fd94fed4fb1bf91843887d1 (diff) | |
download | gcc-08c13199cf5568393fd46481d99cf1729480548a.zip gcc-08c13199cf5568393fd46481d99cf1729480548a.tar.gz gcc-08c13199cf5568393fd46481d99cf1729480548a.tar.bz2 |
cfgloop.c (mark_loop_for_removal): New function.
2014-09-05 Richard Biener <rguenther@suse.de>
* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.
From-SVN: r214942
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index a0b1be5..ae1e7ba 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -766,11 +766,7 @@ ssa_redirect_edges (struct redirection_data **slot, /* If we redirect a loop latch edge cancel its loop. */ if (e->src == e->src->loop_father->latch) - { - e->src->loop_father->header = NULL; - e->src->loop_father->latch = NULL; - loops_state_set (LOOPS_NEED_FIXUP); - } + mark_loop_for_removal (e->src->loop_father); /* Redirect the incoming edge (possibly to the joiner block) to the appropriate duplicate block. */ @@ -1304,9 +1300,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers) { /* If the loop ceased to exist, mark it as such, and thread through its original header. */ - loop->header = NULL; - loop->latch = NULL; - loops_state_set (LOOPS_NEED_FIXUP); + mark_loop_for_removal (loop); return thread_block (header, false); } |