7008866: Missing loop predicate for loop with multiple entries

Add predicates when loop head bytecode is parsed instead of when back branch bytecode is parsed.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2011-03-21 11:28:14 -07:00
parent a3e259c335
commit 3de260da41
15 changed files with 703 additions and 480 deletions

View file

@ -110,6 +110,13 @@ void PhaseIdealLoop::do_unswitching (IdealLoopTree *loop, Node_List &old_new) {
IfNode* unswitch_iff = find_unswitching_candidate((const IdealLoopTree *)loop);
assert(unswitch_iff != NULL, "should be at least one");
#ifndef PRODUCT
if (TraceLoopOpts) {
tty->print("Unswitch %d ", head->unswitch_count()+1);
loop->dump_head();
}
#endif
// Need to revert back to normal loop
if (head->is_CountedLoop() && !head->as_CountedLoop()->is_normal_loop()) {
head->as_CountedLoop()->set_normal_loop();