diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-25 16:47:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:04:53 -0700 |
commit | ca91540095fd708f02c4e125aebc0f645c94354c (patch) | |
tree | ce008683477dc20c0783184a06ab88a39cf11019 /flow.c | |
parent | helper function cleanup: separate delete/replace list entries. (diff) | |
download | sparse-ca91540095fd708f02c4e125aebc0f645c94354c.tar.gz sparse-ca91540095fd708f02c4e125aebc0f645c94354c.tar.bz2 sparse-ca91540095fd708f02c4e125aebc0f645c94354c.zip |
Use cleaned-up ptr list removal for removing basic blocks
from child and parent lists.
Diffstat (limited to 'flow.c')
-rw-r--r-- | flow.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -597,12 +597,21 @@ static void mark_bb_reachable(struct basic_block *bb, unsigned long generation) void kill_bb(struct basic_block *bb) { struct instruction *insn; + struct basic_block *child, *parent; FOR_EACH_PTR(bb->insns, insn) { insn->bb = NULL; } END_FOR_EACH_PTR(insn); bb->insns = NULL; + + FOR_EACH_PTR(bb->children, child) { + remove_bb_from_list(&child->parents, bb); + } END_FOR_EACH_PTR(child); bb->children = NULL; + + FOR_EACH_PTR(bb->parents, parent) { + remove_bb_from_list(&parent->children, bb); + } END_FOR_EACH_PTR(parent); bb->parents = NULL; } |