src/share/vm/opto/loopUnswitch.cpp

changeset 543
a761c2d3b76a
parent 435
a61af66fc99e
child 631
d1605aabd0a1
child 651
8d191a7697e2
equal deleted inserted replaced
542:93b6525e3b82 543:a761c2d3b76a
47 //------------------------------policy_unswitching----------------------------- 47 //------------------------------policy_unswitching-----------------------------
48 // Return TRUE or FALSE if the loop should be unswitched 48 // Return TRUE or FALSE if the loop should be unswitched
49 // (ie. clone loop with an invariant test that does not exit the loop) 49 // (ie. clone loop with an invariant test that does not exit the loop)
50 bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const { 50 bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const {
51 if( !LoopUnswitching ) { 51 if( !LoopUnswitching ) {
52 return false;
53 }
54 if (!_head->is_Loop()) {
52 return false; 55 return false;
53 } 56 }
54 uint nodes_left = MaxNodeLimit - phase->C->unique(); 57 uint nodes_left = MaxNodeLimit - phase->C->unique();
55 if (2 * _body.size() > nodes_left) { 58 if (2 * _body.size() > nodes_left) {
56 return false; // Too speculative if running low on nodes. 59 return false; // Too speculative if running low on nodes.

mercurial