From f18c259989463f9a15270f3584bdeeaae4bd9fb0 Mon Sep 17 00:00:00 2001
From: Luc Van Oostenryck
Date: Sun, 29 Mar 2020 18:42:50 +0200
Subject: simplify remove_parent()
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 --git a/linearize.c b/linearize.c
index ebb03217..6bb1287e 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 */
--
cgit 1.2.3-korg