src/share/vm/opto/loopopts.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7092905 Sdiff src/share/vm/opto

src/share/vm/opto/loopopts.cpp

Print this page




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




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


src/share/vm/opto/loopopts.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File