src/share/vm/opto/arraycopynode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/arraycopynode.cpp

Print this page
rev 8568 : 8086016: closed/java/text/Format/NumberFormat/BigDecimalCompatibilityTest.java is crashing
Summary: Trying to transform ArrayCopyNode in dying part of the graph
Reviewed-by:


 421   if (can_reshape) {
 422     PhaseIterGVN* igvn = phase->is_IterGVN();
 423     igvn->set_delay_transform(false);
 424     if (is_clonebasic()) {
 425       Node* out_mem = proj_out(TypeFunc::Memory);
 426 
 427       if (out_mem->outcnt() != 1 || !out_mem->raw_out(0)->is_MergeMem() ||
 428           out_mem->raw_out(0)->outcnt() != 1 || !out_mem->raw_out(0)->raw_out(0)->is_MemBar()) {
 429         assert(!GraphKit::use_ReduceInitialCardMarks(), "can only happen with card marking");
 430         return false;
 431       }
 432 
 433       igvn->replace_node(out_mem->raw_out(0), mem);
 434 
 435       Node* out_ctl = proj_out(TypeFunc::Control);
 436       igvn->replace_node(out_ctl, ctl);
 437     } else {
 438       // replace fallthrough projections of the ArrayCopyNode by the
 439       // new memory, control and the input IO.
 440       CallProjections callprojs;
 441       extract_projections(&callprojs, true);
 442 

 443       igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));


 444       igvn->replace_node(callprojs.fallthrough_memproj, mem);


 445       igvn->replace_node(callprojs.fallthrough_catchproj, ctl);

 446 
 447       // The ArrayCopyNode is not disconnected. It still has the
 448       // projections for the exception case. Replace current
 449       // ArrayCopyNode with a dummy new one with a top() control so
 450       // that this part of the graph stays consistent but is
 451       // eventually removed.
 452 
 453       set_req(0, phase->C->top());
 454       remove_dead_region(phase, can_reshape);
 455     }
 456   } else {
 457     if (in(TypeFunc::Control) != ctl) {
 458       // we can't return new memory and control from Ideal at parse time
 459       assert(!is_clonebasic(), "added control for clone?");
 460       return false;
 461     }
 462   }
 463   return true;
 464 }
 465 




 421   if (can_reshape) {
 422     PhaseIterGVN* igvn = phase->is_IterGVN();
 423     igvn->set_delay_transform(false);
 424     if (is_clonebasic()) {
 425       Node* out_mem = proj_out(TypeFunc::Memory);
 426 
 427       if (out_mem->outcnt() != 1 || !out_mem->raw_out(0)->is_MergeMem() ||
 428           out_mem->raw_out(0)->outcnt() != 1 || !out_mem->raw_out(0)->raw_out(0)->is_MemBar()) {
 429         assert(!GraphKit::use_ReduceInitialCardMarks(), "can only happen with card marking");
 430         return false;
 431       }
 432 
 433       igvn->replace_node(out_mem->raw_out(0), mem);
 434 
 435       Node* out_ctl = proj_out(TypeFunc::Control);
 436       igvn->replace_node(out_ctl, ctl);
 437     } else {
 438       // replace fallthrough projections of the ArrayCopyNode by the
 439       // new memory, control and the input IO.
 440       CallProjections callprojs;
 441       extract_projections(&callprojs, true, false);
 442 
 443       if (callprojs.fallthrough_ioproj != NULL) {
 444         igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));
 445       }
 446       if (callprojs.fallthrough_memproj != NULL) {
 447         igvn->replace_node(callprojs.fallthrough_memproj, mem);
 448       }
 449       if (callprojs.fallthrough_catchproj != NULL) {
 450         igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
 451       }
 452 
 453       // The ArrayCopyNode is not disconnected. It still has the
 454       // projections for the exception case. Replace current
 455       // ArrayCopyNode with a dummy new one with a top() control so
 456       // that this part of the graph stays consistent but is
 457       // eventually removed.
 458 
 459       set_req(0, phase->C->top());
 460       remove_dead_region(phase, can_reshape);
 461     }
 462   } else {
 463     if (in(TypeFunc::Control) != ctl) {
 464       // we can't return new memory and control from Ideal at parse time
 465       assert(!is_clonebasic(), "added control for clone?");
 466       return false;
 467     }
 468   }
 469   return true;
 470 }
 471 


src/share/vm/opto/arraycopynode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File