998 } 999 1000 static bool merge_point_safe(Node* region) { 1001 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode 1002 // having a PhiNode input. This sidesteps the dangerous case where the split 1003 // ConvI2LNode may become TOP if the input Value() does not 1004 // overlap the ConvI2L range, leaving a node which may not dominate its 1005 // uses. 1006 // A better fix for this problem can be found in the BugTraq entry, but 1007 // expediency for Mantis demands this hack. 1008 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop 1009 // split_if_with_blocks from splitting a block because we could not move around 1010 // the FastLockNode. 1011 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { 1012 Node* n = region->fast_out(i); 1013 if (n->is_Phi()) { 1014 for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) { 1015 Node* m = n->fast_out(j); 1016 if (m->is_FastLock()) 1017 return false; 1018 #ifdef _LP64 1019 if (m->Opcode() == Op_ConvI2L) 1020 return false; 1021 if (m->is_CastII() && m->isa_CastII()->has_range_check()) { 1022 return false; 1023 } 1024 #endif 1025 } 1026 } 1027 } 1028 return true; 1029 } 1030 1031 1032 //------------------------------place_near_use--------------------------------- 1033 // Place some computation next to use but not inside inner loops. 1034 // For inner loop uses move it to the preheader area. 1035 Node *PhaseIdealLoop::place_near_use( Node *useblock ) const { 1036 IdealLoopTree *u_loop = get_loop( useblock ); 1037 return (u_loop->_irreducible || u_loop->_child) | 998 } 999 1000 static bool merge_point_safe(Node* region) { 1001 // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode 1002 // having a PhiNode input. This sidesteps the dangerous case where the split 1003 // ConvI2LNode may become TOP if the input Value() does not 1004 // overlap the ConvI2L range, leaving a node which may not dominate its 1005 // uses. 1006 // A better fix for this problem can be found in the BugTraq entry, but 1007 // expediency for Mantis demands this hack. 1008 // 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop 1009 // split_if_with_blocks from splitting a block because we could not move around 1010 // the FastLockNode. 1011 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { 1012 Node* n = region->fast_out(i); 1013 if (n->is_Phi()) { 1014 for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) { 1015 Node* m = n->fast_out(j); 1016 if (m->is_FastLock()) 1017 return false; 1018 if (m->is_ValueType()) { 1019 // TODO this breaks optimizations! 1020 // Value types should not be split through phis 1021 //return false; 1022 } 1023 #ifdef _LP64 1024 if (m->Opcode() == Op_ConvI2L) 1025 return false; 1026 if (m->is_CastII() && m->isa_CastII()->has_range_check()) { 1027 return false; 1028 } 1029 #endif 1030 } 1031 } 1032 } 1033 return true; 1034 } 1035 1036 1037 //------------------------------place_near_use--------------------------------- 1038 // Place some computation next to use but not inside inner loops. 1039 // For inner loop uses move it to the preheader area. 1040 Node *PhaseIdealLoop::place_near_use( Node *useblock ) const { 1041 IdealLoopTree *u_loop = get_loop( useblock ); 1042 return (u_loop->_irreducible || u_loop->_child) |