提交 dc58eb6c 编写于 作者: C cfang

6855164: SIGSEGV during compilation of method involving loop over CharSequence.

Summary: Don not split a block if it contains a FastLockNode with a PhiNode input.
Reviewed-by: kvn, never
上级 4f0a93f4
...@@ -667,7 +667,6 @@ static bool merge_point_too_heavy(Compile* C, Node* region) { ...@@ -667,7 +667,6 @@ static bool merge_point_too_heavy(Compile* C, Node* region) {
} }
} }
#ifdef _LP64
static bool merge_point_safe(Node* region) { static bool merge_point_safe(Node* region) {
// 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode // 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
// having a PhiNode input. This sidesteps the dangerous case where the split // having a PhiNode input. This sidesteps the dangerous case where the split
...@@ -676,20 +675,25 @@ static bool merge_point_safe(Node* region) { ...@@ -676,20 +675,25 @@ static bool merge_point_safe(Node* region) {
// uses. // uses.
// A better fix for this problem can be found in the BugTraq entry, but // A better fix for this problem can be found in the BugTraq entry, but
// expediency for Mantis demands this hack. // expediency for Mantis demands this hack.
// 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
// split_if_with_blocks from splitting a block because we could not move around
// the FastLockNode.
for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
Node* n = region->fast_out(i); Node* n = region->fast_out(i);
if (n->is_Phi()) { if (n->is_Phi()) {
for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) { for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
Node* m = n->fast_out(j); Node* m = n->fast_out(j);
if (m->Opcode() == Op_ConvI2L) { if (m->is_FastLock())
return false; return false;
} #ifdef _LP64
if (m->Opcode() == Op_ConvI2L)
return false;
#endif
} }
} }
} }
return true; return true;
} }
#endif
//------------------------------place_near_use--------------------------------- //------------------------------place_near_use---------------------------------
...@@ -771,12 +775,10 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) { ...@@ -771,12 +775,10 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
if( get_loop(n_ctrl->in(j)) != n_loop ) if( get_loop(n_ctrl->in(j)) != n_loop )
return; return;
#ifdef _LP64
// Check for safety of the merge point. // Check for safety of the merge point.
if( !merge_point_safe(n_ctrl) ) { if( !merge_point_safe(n_ctrl) ) {
return; return;
} }
#endif
// Split compare 'n' through the merge point if it is profitable // Split compare 'n' through the merge point if it is profitable
Node *phi = split_thru_phi( n, n_ctrl, policy ); Node *phi = split_thru_phi( n, n_ctrl, policy );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册