638 if( !phi ) return n;
639
640 // Found a Phi to split thru!
641 // Replace 'n' with the new phi
642 _igvn.hash_delete(n);
643 _igvn.subsume_node( n, phi );
644 // Moved a load around the loop, 'en-registering' something.
645 if( n_blk->Opcode() == Op_Loop && n->is_Load() &&
646 !phi->in(LoopNode::LoopBackControl)->is_Load() )
647 C->set_major_progress();
648
649 return phi;
650 }
651
652 static bool merge_point_too_heavy(Compile* C, Node* region) {
653 // Bail out if the region and its phis have too many users.
654 int weight = 0;
655 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
656 weight += region->fast_out(i)->outcnt();
657 }
658 int nodes_left = MaxNodeLimit - C->unique();
659 if (weight * 8 > nodes_left) {
660 #ifndef PRODUCT
661 if (PrintOpto)
662 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight);
663 #endif
664 return true;
665 } else {
666 return false;
667 }
668 }
669
670 static bool merge_point_safe(Node* region) {
671 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
672 // having a PhiNode input. This sidesteps the dangerous case where the split
673 // ConvI2LNode may become TOP if the input Value() does not
674 // overlap the ConvI2L range, leaving a node which may not dominate its
675 // uses.
676 // A better fix for this problem can be found in the BugTraq entry, but
677 // expediency for Mantis demands this hack.
678 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
|
638 if( !phi ) return n;
639
640 // Found a Phi to split thru!
641 // Replace 'n' with the new phi
642 _igvn.hash_delete(n);
643 _igvn.subsume_node( n, phi );
644 // Moved a load around the loop, 'en-registering' something.
645 if( n_blk->Opcode() == Op_Loop && n->is_Load() &&
646 !phi->in(LoopNode::LoopBackControl)->is_Load() )
647 C->set_major_progress();
648
649 return phi;
650 }
651
652 static bool merge_point_too_heavy(Compile* C, Node* region) {
653 // Bail out if the region and its phis have too many users.
654 int weight = 0;
655 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
656 weight += region->fast_out(i)->outcnt();
657 }
658 int nodes_left = C->nodes_limit() - C->unique();
659 if (weight * 8 > nodes_left) {
660 #ifndef PRODUCT
661 if (PrintOpto)
662 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight);
663 #endif
664 return true;
665 } else {
666 return false;
667 }
668 }
669
670 static bool merge_point_safe(Node* region) {
671 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
672 // having a PhiNode input. This sidesteps the dangerous case where the split
673 // ConvI2LNode may become TOP if the input Value() does not
674 // overlap the ConvI2L range, leaving a node which may not dominate its
675 // uses.
676 // A better fix for this problem can be found in the BugTraq entry, but
677 // expediency for Mantis demands this hack.
678 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
|