Mercurial > hg > truffle
comparison src/share/vm/opto/loopUnswitch.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 | 9e69e8d1c900 |
comparison
equal
deleted
inserted
replaced
7195:2cd5e15048e6 | 7196:2aff40cb4703 |
---|---|
57 return false; | 57 return false; |
58 } | 58 } |
59 if (!_head->is_Loop()) { | 59 if (!_head->is_Loop()) { |
60 return false; | 60 return false; |
61 } | 61 } |
62 uint nodes_left = MaxNodeLimit - phase->C->unique(); | 62 uint nodes_left = MaxNodeLimit - phase->C->live_nodes(); |
63 if (2 * _body.size() > nodes_left) { | 63 if (2 * _body.size() > nodes_left) { |
64 return false; // Too speculative if running low on nodes. | 64 return false; // Too speculative if running low on nodes. |
65 } | 65 } |
66 LoopNode* head = _head->as_Loop(); | 66 LoopNode* head = _head->as_Loop(); |
67 if (head->unswitch_count() + 1 > head->unswitch_max()) { | 67 if (head->unswitch_count() + 1 > head->unswitch_max()) { |