aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloop.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/cfgloop.c
parent1e074e77b47e9c96c290e6caf3e46e6ffbcd8d06 (diff)
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/cfgloop.c')
-rw-r--r--gcc/cfgloop.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index dcf23ca1fbb..789c45a8f03 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -1921,3 +1921,13 @@ bb_loop_depth (const_basic_block bb)
{
return bb->loop_father ? loop_depth (bb->loop_father) : 0;
}
+
+/* Marks LOOP for removal and sets LOOPS_NEED_FIXUP. */
+
+void
+mark_loop_for_removal (loop_p loop)
+{
+ loop->header = NULL;
+ loop->latch = NULL;
+ loops_state_set (LOOPS_NEED_FIXUP);
+}