aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-03-29 18:42:50 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-19 23:56:44 +0100
commit701775cdf99d737aeaed00419eaff65d05ef1b57 (patch)
tree3eb0a08055d6cd673d1ab835834e203556bea44e
parentf18c259989463f9a15270f3584bdeeaae4bd9fb0 (diff)
downloadsparse-701775cdf99d737aeaed00419eaff65d05ef1b57.tar.gz
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 <luc.vanoostenryck@gmail.com>
-rw-r--r--linearize.c7
1 files changed, 1 insertions, 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;