diff mbox series

[05/13] fold remove_parent() into insert_branch()

Message ID 20210321123505.27993-6-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
Fold remove_parent() into its only user, insert_branch(), since it's
now just a wrapper around remove_bb_from_list().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 linearize.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/linearize.c b/linearize.c
index 6bb1287efcb0..2268b0951376 100644
--- a/linearize.c
+++ b/linearize.c
@@ -692,11 +692,6 @@  static void set_activeblock(struct entrypoint *ep, struct basic_block *bb)
 		add_bb(&ep->bbs, bb);
 }
 
-static void remove_parent(struct basic_block *child, struct basic_block *parent)
-{
-	remove_bb_from_list(&child->parents, parent, 1);
-}
-
 /* Change a "switch" or a conditional branch into a branch */
 void insert_branch(struct instruction *jmp, struct basic_block *target)
 {
@@ -720,7 +715,7 @@  void insert_branch(struct instruction *jmp, struct basic_block *target)
 			continue;
 		}
 		DELETE_CURRENT_PTR(child);
-		remove_parent(child, bb);
+		remove_bb_from_list(&child->parents, bb, 1);
 	} END_FOR_EACH_PTR(child);
 	PACK_PTR_LIST(&bb->children);
 	repeat_phase |= REPEAT_CFG_CLEANUP;