From 701775cdf99d737aeaed00419eaff65d05ef1b57 Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Sun, 29 Mar 2020 18:42:50 +0200 Subject: fold remove_parent() into insert_branch() 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 --- linearize.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/linearize.c b/linearize.c index 6bb1287e..2268b095 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; -- cgit 1.2.3-korg