8086016: closed/java/text/Format/NumberFormat/BigDecimalCompatibilityTest.java is crashing

Trying to transform ArrayCopyNode in dying part of the graph

Reviewed-by: kvn
This commit is contained in:
Roland Westrelin 2015-06-09 12:09:03 +02:00
parent 518225447f
commit fd10da6423
3 changed files with 20 additions and 13 deletions

View File

@ -438,11 +438,17 @@ bool ArrayCopyNode::finish_transform(PhaseGVN *phase, bool can_reshape,
// replace fallthrough projections of the ArrayCopyNode by the
// new memory, control and the input IO.
CallProjections callprojs;
extract_projections(&callprojs, true);
extract_projections(&callprojs, true, false);
igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));
igvn->replace_node(callprojs.fallthrough_memproj, mem);
igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
if (callprojs.fallthrough_ioproj != NULL) {
igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));
}
if (callprojs.fallthrough_memproj != NULL) {
igvn->replace_node(callprojs.fallthrough_memproj, mem);
}
if (callprojs.fallthrough_catchproj != NULL) {
igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
}
// The ArrayCopyNode is not disconnected. It still has the
// projections for the exception case. Replace current

View File

@ -830,7 +830,7 @@ Node *CallNode::result_cast() {
}
void CallNode::extract_projections(CallProjections* projs, bool separate_io_proj) {
void CallNode::extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts) {
projs->fallthrough_proj = NULL;
projs->fallthrough_catchproj = NULL;
projs->fallthrough_ioproj = NULL;
@ -893,17 +893,18 @@ void CallNode::extract_projections(CallProjections* projs, bool separate_io_proj
}
}
// The resproj may not exist because the result couuld be ignored
// The resproj may not exist because the result could be ignored
// and the exception object may not exist if an exception handler
// swallows the exception but all the other must exist and be found.
assert(projs->fallthrough_proj != NULL, "must be found");
assert(Compile::current()->inlining_incrementally() || projs->fallthrough_catchproj != NULL, "must be found");
assert(Compile::current()->inlining_incrementally() || projs->fallthrough_memproj != NULL, "must be found");
assert(Compile::current()->inlining_incrementally() || projs->fallthrough_ioproj != NULL, "must be found");
assert(Compile::current()->inlining_incrementally() || projs->catchall_catchproj != NULL, "must be found");
do_asserts = do_asserts && !Compile::current()->inlining_incrementally();
assert(!do_asserts || projs->fallthrough_catchproj != NULL, "must be found");
assert(!do_asserts || projs->fallthrough_memproj != NULL, "must be found");
assert(!do_asserts || projs->fallthrough_ioproj != NULL, "must be found");
assert(!do_asserts || projs->catchall_catchproj != NULL, "must be found");
if (separate_io_proj) {
assert(Compile::current()->inlining_incrementally() || projs->catchall_memproj != NULL, "must be found");
assert(Compile::current()->inlining_incrementally() || projs->catchall_ioproj != NULL, "must be found");
assert(!do_asserts || projs->catchall_memproj != NULL, "must be found");
assert(!do_asserts || projs->catchall_ioproj != NULL, "must be found");
}
}

View File

@ -628,7 +628,7 @@ public:
// Collect all the interesting edges from a call for use in
// replacing the call by something else. Used by macro expansion
// and the late inlining support.
void extract_projections(CallProjections* projs, bool separate_io_proj);
void extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts = true);
virtual uint match_edge(uint idx) const;