Mercurial > hg > truffle
diff src/share/vm/opto/phaseX.cpp @ 7196:2aff40cb4703
7092905: C2: Keep track of the number of dead nodes
Summary: keep an (almost) accurate running count of the reachable (live) flow graph nodes.
Reviewed-by: kvn, twisti, jrose, vlivanov
author | bharadwaj |
---|---|
date | Tue, 27 Nov 2012 17:24:15 -0800 |
parents | b9a9ed0f8eeb |
children | d092d1b31229 |
line wrap: on
line diff
--- a/src/share/vm/opto/phaseX.cpp Tue Nov 27 12:48:52 2012 -0800 +++ b/src/share/vm/opto/phaseX.cpp Tue Nov 27 17:24:15 2012 -0800 @@ -383,6 +383,8 @@ // Identify nodes that are reachable from below, useful. C->identify_useful_nodes(_useful); + // Update dead node list + C->update_dead_node_list(_useful); // Remove all useless nodes from PhaseValues' recorded types // Must be done before disconnecting nodes to preserve hash-table-invariant @@ -1190,7 +1192,7 @@ } } } - + C->record_dead_node(dead->_idx); if (dead->is_macro()) { C->remove_macro_node(dead); } @@ -1199,6 +1201,11 @@ continue; } } + // Constant node that has no out-edges and has only one in-edge from + // root is usually dead. However, sometimes reshaping walk makes + // it reachable by adding use edges. So, we will NOT count Con nodes + // as dead to be conservative about the dead node count at any + // given time. } // Aggressively kill globally dead uses