From 5e3c2d4b238f10e6e6db36810469483334d4bcb0 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 14 Jan 2020 14:14:54 +0100 Subject: [PATCH] preserve EDGE_DFS_BACK across split_edge This moves EDGE_DFS_BACK to the appropriate edge when the split edge had it set. 2020-05-12 Richard Biener * cfghooks.c (split_edge): Preserve EDGE_DFS_BACK if set. --- gcc/ChangeLog | 4 ++++ gcc/cfghooks.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72b56ad6f2e..b0a9212688a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2020-05-12 Richard Biener + + * cfghooks.c (split_edge): Preserve EDGE_DFS_BACK if set. + 2020-05-12 Martin Liska PR sanitizer/95033 diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index ea558b46947..71c6b63ad3b 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -640,6 +640,7 @@ split_edge (edge e) profile_count count = e->count (); edge f; bool irr = (e->flags & EDGE_IRREDUCIBLE_LOOP) != 0; + bool back = (e->flags & EDGE_DFS_BACK) != 0; class loop *loop; basic_block src = e->src, dest = e->dest; @@ -659,6 +660,11 @@ split_edge (edge e) single_pred_edge (ret)->flags |= EDGE_IRREDUCIBLE_LOOP; single_succ_edge (ret)->flags |= EDGE_IRREDUCIBLE_LOOP; } + if (back) + { + single_pred_edge (ret)->flags &= ~EDGE_DFS_BACK; + single_succ_edge (ret)->flags |= EDGE_DFS_BACK; + } if (dom_info_available_p (CDI_DOMINATORS)) set_immediate_dominator (CDI_DOMINATORS, ret, single_pred (ret)); -- 2.30.2