434 else if (m != iff && split_up(m, region, iff)) {
435 // fall through
436 } else {
437 continue;
438 }
439 // Something unpredictable changed.
440 // Tell the iterators to refresh themselves, and rerun the loop.
441 i = region->refresh_out_pos(i);
442 j = region->refresh_out_pos(j);
443 progress = true;
444 }
445 }
446 }
447
448 // Now we have no instructions in the block containing the IF.
449 // Split the IF.
450 Node *new_iff = split_thru_region( iff, region );
451
452 // Replace both uses of 'new_iff' with Regions merging True/False
453 // paths. This makes 'new_iff' go dead.
454 Node *old_false, *old_true;
455 Node *new_false, *new_true;
456 for (DUIterator_Last j2min, j2 = iff->last_outs(j2min); j2 >= j2min; --j2) {
457 Node *ifp = iff->last_out(j2);
458 assert( ifp->Opcode() == Op_IfFalse || ifp->Opcode() == Op_IfTrue, "" );
459 ifp->set_req(0, new_iff);
460 Node *ifpx = split_thru_region( ifp, region );
461
462 // Replace 'If' projection of a Region with a Region of
463 // 'If' projections.
464 ifpx->set_req(0, ifpx); // A TRUE RegionNode
465
466 // Setup dominator info
467 set_idom(ifpx, region_dom, dom_depth(region_dom) + 1);
468
469 // Check for splitting loop tails
470 if( get_loop(iff)->tail() == ifp )
471 get_loop(iff)->_tail = ifpx;
472
473 // Replace in the graph with lazy-update mechanism
474 new_iff->set_req(0, new_iff); // hook self so it does not go dead
475 lazy_replace_proj( ifp, ifpx );
|
434 else if (m != iff && split_up(m, region, iff)) {
435 // fall through
436 } else {
437 continue;
438 }
439 // Something unpredictable changed.
440 // Tell the iterators to refresh themselves, and rerun the loop.
441 i = region->refresh_out_pos(i);
442 j = region->refresh_out_pos(j);
443 progress = true;
444 }
445 }
446 }
447
448 // Now we have no instructions in the block containing the IF.
449 // Split the IF.
450 Node *new_iff = split_thru_region( iff, region );
451
452 // Replace both uses of 'new_iff' with Regions merging True/False
453 // paths. This makes 'new_iff' go dead.
454 Node *old_false = NULL, *old_true = NULL;
455 Node *new_false = NULL, *new_true = NULL;
456 for (DUIterator_Last j2min, j2 = iff->last_outs(j2min); j2 >= j2min; --j2) {
457 Node *ifp = iff->last_out(j2);
458 assert( ifp->Opcode() == Op_IfFalse || ifp->Opcode() == Op_IfTrue, "" );
459 ifp->set_req(0, new_iff);
460 Node *ifpx = split_thru_region( ifp, region );
461
462 // Replace 'If' projection of a Region with a Region of
463 // 'If' projections.
464 ifpx->set_req(0, ifpx); // A TRUE RegionNode
465
466 // Setup dominator info
467 set_idom(ifpx, region_dom, dom_depth(region_dom) + 1);
468
469 // Check for splitting loop tails
470 if( get_loop(iff)->tail() == ifp )
471 get_loop(iff)->_tail = ifpx;
472
473 // Replace in the graph with lazy-update mechanism
474 new_iff->set_req(0, new_iff); // hook self so it does not go dead
475 lazy_replace_proj( ifp, ifpx );
|