diff mbox series

[04/13] simplify remove_parent()

Message ID 20210321123505.27993-5-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series remove phi-sources from removed branches | expand

Commit Message

Luc Van Oostenryck March 21, 2021, 12:34 p.m. UTC
remove_parent() is a simple wrapper around remove_bb_from_list()
which also set REPEAT_CFG_CLEANUP if the list becomes empty.
But its only user, insert_branch(), doesn't need REPEAT_CFG_CLEANUP
to be set.

So, simplify this wrapper by keeping only the call to remove_bb_from_list().
---
 linearize.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/linearize.c b/linearize.c
index ebb03217c9d9..6bb1287efcb0 100644
--- a/linearize.c
+++ b/linearize.c
@@ -695,8 +695,6 @@  static void set_activeblock(struct entrypoint *ep, struct basic_block *bb)
 static void remove_parent(struct basic_block *child, struct basic_block *parent)
 {
 	remove_bb_from_list(&child->parents, parent, 1);
-	if (!child->parents)
-		repeat_phase |= REPEAT_CFG_CLEANUP;
 }
 
 /* Change a "switch" or a conditional branch into a branch */