Mercurial > hg > truffle
comparison src/share/vm/opto/loopopts.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 | d804e148cff8 |
children | 3b9368710f08 |
comparison
equal
deleted
inserted
replaced
7195:2cd5e15048e6 | 7196:2aff40cb4703 |
---|---|
727 // Bail out if the region and its phis have too many users. | 727 // Bail out if the region and its phis have too many users. |
728 int weight = 0; | 728 int weight = 0; |
729 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { | 729 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { |
730 weight += region->fast_out(i)->outcnt(); | 730 weight += region->fast_out(i)->outcnt(); |
731 } | 731 } |
732 int nodes_left = MaxNodeLimit - C->unique(); | 732 int nodes_left = MaxNodeLimit - C->live_nodes(); |
733 if (weight * 8 > nodes_left) { | 733 if (weight * 8 > nodes_left) { |
734 #ifndef PRODUCT | 734 #ifndef PRODUCT |
735 if (PrintOpto) | 735 if (PrintOpto) |
736 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight); | 736 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight); |
737 #endif | 737 #endif |