src/share/vm/opto/loopUnswitch.cpp

changeset 2665
9dc311b8473e
parent 2314
f95d63e2154a
child 2708
1d1603768966
child 2727
08eb13460b3a
equal deleted inserted replaced
2664:3ef1a1866a60 2665:9dc311b8473e
107 // Find first invariant test that doesn't exit the loop 107 // Find first invariant test that doesn't exit the loop
108 LoopNode *head = loop->_head->as_Loop(); 108 LoopNode *head = loop->_head->as_Loop();
109 109
110 IfNode* unswitch_iff = find_unswitching_candidate((const IdealLoopTree *)loop); 110 IfNode* unswitch_iff = find_unswitching_candidate((const IdealLoopTree *)loop);
111 assert(unswitch_iff != NULL, "should be at least one"); 111 assert(unswitch_iff != NULL, "should be at least one");
112
113 #ifndef PRODUCT
114 if (TraceLoopOpts) {
115 tty->print("Unswitch %d ", head->unswitch_count()+1);
116 loop->dump_head();
117 }
118 #endif
112 119
113 // Need to revert back to normal loop 120 // Need to revert back to normal loop
114 if (head->is_CountedLoop() && !head->as_CountedLoop()->is_normal_loop()) { 121 if (head->is_CountedLoop() && !head->as_CountedLoop()->is_normal_loop()) {
115 head->as_CountedLoop()->set_normal_loop(); 122 head->as_CountedLoop()->set_normal_loop();
116 } 123 }

mercurial