- if (is_Block(ka) && (get_Block_dom_depth(ka) == -1))
- set_End_keepalive(end, i, new_Bad());
- if (is_Phi(ka) && (get_Block_dom_depth(get_nodes_block(ka)) == -1))
- set_End_keepalive(end, i, new_Bad());
+ if (is_Block(ka)) {
+ /* do NOT keep dead blocks */
+ if (get_Block_dom_depth(ka) == -1)
+ set_End_keepalive(end, i, new_Bad());
+ }
+ else if (is_Block_dead(get_nodes_block(ka)) ||
+ get_Block_dom_depth(get_nodes_block(ka)) == -1)
+ /* do NOT keep nodes in dead blocks */
+ set_End_keepalive(end, i, new_Bad());