aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/loopopts.cpp
diff options
context:
space:
mode:
authorcfang <none@none>2009-07-02 16:18:19 -0700
committercfang <none@none>2009-07-02 16:18:19 -0700
commitd66e44647df0910f912309a99c5237b33cddda88 (patch)
tree457069e029f026b637af1b38de4db214dce482cd /src/share/vm/opto/loopopts.cpp
parent0cf847c751048c4472801c767c2733d008e0f025 (diff)
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
Diffstat (limited to 'src/share/vm/opto/loopopts.cpp')
-rw-r--r--src/share/vm/opto/loopopts.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/share/vm/opto/loopopts.cpp b/src/share/vm/opto/loopopts.cpp
index 454c207fd..5084e3d82 100644
--- a/src/share/vm/opto/loopopts.cpp
+++ b/src/share/vm/opto/loopopts.cpp
@@ -667,7 +667,6 @@ static bool merge_point_too_heavy(Compile* C, Node* region) {
}
}
-#ifdef _LP64
static bool merge_point_safe(Node* region) {
// 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
@@ -676,20 +675,25 @@ static bool merge_point_safe(Node* region) {
// uses.
// A better fix for this problem can be found in the BugTraq entry, but
// 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++) {
Node* n = region->fast_out(i);
if (n->is_Phi()) {
for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
Node* m = n->fast_out(j);
- if (m->Opcode() == Op_ConvI2L) {
+ if (m->is_FastLock())
return false;
- }
+#ifdef _LP64
+ if (m->Opcode() == Op_ConvI2L)
+ return false;
+#endif
}
}
}
return true;
}
-#endif
//------------------------------place_near_use---------------------------------
@@ -771,12 +775,10 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
if( get_loop(n_ctrl->in(j)) != n_loop )
return;
-#ifdef _LP64
// Check for safety of the merge point.
if( !merge_point_safe(n_ctrl) ) {
return;
}
-#endif
// Split compare 'n' through the merge point if it is profitable
Node *phi = split_thru_phi( n, n_ctrl, policy );