aboutsummaryrefslogtreecommitdiffstats
path: root/flow.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-03 12:54:58 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:27 -0700
commit422bd24978f19c2ffd3b3f88ac4a083eea4389b3 (patch)
treec8d9d07fb2e9d30598d12dfa48b7f49edb545360 /flow.c
parenta2fcb6ce7391419d92e62b388a9af16bb2d4a5e1 (diff)
downloadsparse-422bd24978f19c2ffd3b3f88ac4a083eea4389b3.tar.gz
Make the "entrypoint" be a special OP_ENTRY instruction instead of
a special basic block. This removes a lot of special cases, since now flow doesn't have any special BB to worry about. It also gives a clear definition point for argument pseudos, and thus makes liveness tracking lose a special case.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/flow.c b/flow.c
index fdd9eb98..9dae501d 100644
--- a/flow.c
+++ b/flow.c
@@ -752,7 +752,7 @@ void kill_unreachable_bbs(struct entrypoint *ep)
struct basic_block *bb;
unsigned long generation = ++bb_generation;
- mark_bb_reachable(ep->entry, generation);
+ mark_bb_reachable(ep->entry->bb, generation);
FOR_EACH_PTR(ep->bbs, bb) {
if (bb->generation == generation)
continue;
@@ -882,7 +882,7 @@ static void vrfy_bb_flow(struct basic_block *bb)
void vrfy_flow(struct entrypoint *ep)
{
struct basic_block *bb;
- struct basic_block *entry = ep->entry;
+ struct basic_block *entry = ep->entry->bb;
FOR_EACH_PTR(ep->bbs, bb) {
if (bb == entry)
@@ -917,8 +917,6 @@ void pack_basic_blocks(struct entrypoint *ep)
struct basic_block *replace;
replace = rewrite_branch_bb(bb, first);
if (replace) {
- if (bb == ep->entry)
- ep->entry = replace;
kill_bb(bb);
goto no_merge;
}
@@ -930,9 +928,6 @@ void pack_basic_blocks(struct entrypoint *ep)
} END_FOR_EACH_PTR(first);
out:
- if (ep->entry == bb)
- continue;
-
/*
* See if we only have one parent..
*/