< prev index next >

src/share/vm/opto/loopopts.cpp

Print this page




 755   // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
 756   // having a PhiNode input. This sidesteps the dangerous case where the split
 757   // ConvI2LNode may become TOP if the input Value() does not
 758   // overlap the ConvI2L range, leaving a node which may not dominate its
 759   // uses.
 760   // A better fix for this problem can be found in the BugTraq entry, but
 761   // expediency for Mantis demands this hack.
 762   // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
 763   // split_if_with_blocks from splitting a block because we could not move around
 764   // the FastLockNode.
 765   for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
 766     Node* n = region->fast_out(i);
 767     if (n->is_Phi()) {
 768       for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
 769         Node* m = n->fast_out(j);
 770         if (m->is_FastLock())
 771           return false;
 772 #ifdef _LP64
 773         if (m->Opcode() == Op_ConvI2L)
 774           return false;



 775 #endif
 776       }
 777     }
 778   }
 779   return true;
 780 }
 781 
 782 
 783 //------------------------------place_near_use---------------------------------
 784 // Place some computation next to use but not inside inner loops.
 785 // For inner loop uses move it to the preheader area.
 786 Node *PhaseIdealLoop::place_near_use( Node *useblock ) const {
 787   IdealLoopTree *u_loop = get_loop( useblock );
 788   return (u_loop->_irreducible || u_loop->_child)
 789     ? useblock
 790     : u_loop->_head->in(LoopNode::EntryControl);
 791 }
 792 
 793 
 794 //------------------------------split_if_with_blocks_post----------------------




 755   // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
 756   // having a PhiNode input. This sidesteps the dangerous case where the split
 757   // ConvI2LNode may become TOP if the input Value() does not
 758   // overlap the ConvI2L range, leaving a node which may not dominate its
 759   // uses.
 760   // A better fix for this problem can be found in the BugTraq entry, but
 761   // expediency for Mantis demands this hack.
 762   // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
 763   // split_if_with_blocks from splitting a block because we could not move around
 764   // the FastLockNode.
 765   for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
 766     Node* n = region->fast_out(i);
 767     if (n->is_Phi()) {
 768       for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
 769         Node* m = n->fast_out(j);
 770         if (m->is_FastLock())
 771           return false;
 772 #ifdef _LP64
 773         if (m->Opcode() == Op_ConvI2L)
 774           return false;
 775         if (m->is_CastII() && m->isa_CastII()->has_range_check()) {
 776           return false;
 777         }
 778 #endif
 779       }
 780     }
 781   }
 782   return true;
 783 }
 784 
 785 
 786 //------------------------------place_near_use---------------------------------
 787 // Place some computation next to use but not inside inner loops.
 788 // For inner loop uses move it to the preheader area.
 789 Node *PhaseIdealLoop::place_near_use( Node *useblock ) const {
 790   IdealLoopTree *u_loop = get_loop( useblock );
 791   return (u_loop->_irreducible || u_loop->_child)
 792     ? useblock
 793     : u_loop->_head->in(LoopNode::EntryControl);
 794 }
 795 
 796 
 797 //------------------------------split_if_with_blocks_post----------------------


< prev index next >