diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-03 12:54:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:27 -0700 |
commit | 422bd24978f19c2ffd3b3f88ac4a083eea4389b3 (patch) | |
tree | c8d9d07fb2e9d30598d12dfa48b7f49edb545360 /flow.c | |
parent | a2fcb6ce7391419d92e62b388a9af16bb2d4a5e1 (diff) | |
download | sparse-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.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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.. */ |