aboutsummaryrefslogtreecommitdiff
path: root/flow.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-08 09:53:25 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:36 -0700
commitb6fabb1243cc19130ce86ea45fd08ceeb97fcebb (patch)
tree65c25444f1afb9a4830bb871fd16d076cdf4c8cb /flow.c
parentAdd silly storage handling example. (diff)
downloadsparse-b6fabb1243cc19130ce86ea45fd08ceeb97fcebb.tar.gz
sparse-b6fabb1243cc19130ce86ea45fd08ceeb97fcebb.tar.bz2
sparse-b6fabb1243cc19130ce86ea45fd08ceeb97fcebb.zip
Remove unreachable bb's from the list of bb's when we kill them.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/flow.c b/flow.c
index 061711d..50ba32d 100644
--- a/flow.c
+++ b/flow.c
@@ -766,7 +766,10 @@ void kill_unreachable_bbs(struct entrypoint *ep)
continue;
/* Mark it as being dead */
kill_bb(bb);
+ bb->ep = NULL;
+ DELETE_CURRENT_PTR(bb);
} END_FOR_EACH_PTR(bb);
+ PACK_PTR_LIST(&ep->bbs);
}
static int rewrite_parent_branch(struct basic_block *bb, struct basic_block *old, struct basic_block *new)