summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-05 09:17:49 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-05 09:17:49 +0000
commitd25159ccc19890dd9c7f77ebd8fb87d274ea1b75 (patch)
tree498eb05797e1926e45952564278499d1d7db531b /gcc/tree-ssa-threadupdate.c
parent1e074e77b47e9c96c290e6caf3e46e6ffbcd8d06 (diff)
downloadgcc-d25159ccc19890dd9c7f77ebd8fb87d274ea1b75.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index a0b1be544ad..ae1e7bacb5a 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);
}