717 Node *phi = split_thru_phi( n, n_blk, policy );
718 if (!phi) return n;
719
720 // Found a Phi to split thru!
721 // Replace 'n' with the new phi
722 _igvn.replace_node( n, phi );
723 // Moved a load around the loop, 'en-registering' something.
724 if (n_blk->is_Loop() && n->is_Load() &&
725 !phi->in(LoopNode::LoopBackControl)->is_Load())
726 C->set_major_progress();
727
728 return phi;
729 }
730
731 static bool merge_point_too_heavy(Compile* C, Node* region) {
732 // Bail out if the region and its phis have too many users.
733 int weight = 0;
734 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
735 weight += region->fast_out(i)->outcnt();
736 }
737 int nodes_left = MaxNodeLimit - C->live_nodes();
738 if (weight * 8 > nodes_left) {
739 #ifndef PRODUCT
740 if (PrintOpto)
741 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight);
742 #endif
743 return true;
744 } else {
745 return false;
746 }
747 }
748
749 static bool merge_point_safe(Node* region) {
750 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
751 // having a PhiNode input. This sidesteps the dangerous case where the split
752 // ConvI2LNode may become TOP if the input Value() does not
753 // overlap the ConvI2L range, leaving a node which may not dominate its
754 // uses.
755 // A better fix for this problem can be found in the BugTraq entry, but
756 // expediency for Mantis demands this hack.
757 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
|
717 Node *phi = split_thru_phi( n, n_blk, policy );
718 if (!phi) return n;
719
720 // Found a Phi to split thru!
721 // Replace 'n' with the new phi
722 _igvn.replace_node( n, phi );
723 // Moved a load around the loop, 'en-registering' something.
724 if (n_blk->is_Loop() && n->is_Load() &&
725 !phi->in(LoopNode::LoopBackControl)->is_Load())
726 C->set_major_progress();
727
728 return phi;
729 }
730
731 static bool merge_point_too_heavy(Compile* C, Node* region) {
732 // Bail out if the region and its phis have too many users.
733 int weight = 0;
734 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
735 weight += region->fast_out(i)->outcnt();
736 }
737 int nodes_left = C->max_node_limit() - C->live_nodes();
738 if (weight * 8 > nodes_left) {
739 #ifndef PRODUCT
740 if (PrintOpto)
741 tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight);
742 #endif
743 return true;
744 } else {
745 return false;
746 }
747 }
748
749 static bool merge_point_safe(Node* region) {
750 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
751 // having a PhiNode input. This sidesteps the dangerous case where the split
752 // ConvI2LNode may become TOP if the input Value() does not
753 // overlap the ConvI2L range, leaving a node which may not dominate its
754 // uses.
755 // A better fix for this problem can be found in the BugTraq entry, but
756 // expediency for Mantis demands this hack.
757 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
|