480 }
481 if (callprojs.fallthrough_memproj != NULL) {
482 igvn->replace_node(callprojs.fallthrough_memproj, mem);
483 }
484 if (callprojs.fallthrough_catchproj != NULL) {
485 igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
486 }
487
488 // The ArrayCopyNode is not disconnected. It still has the
489 // projections for the exception case. Replace current
490 // ArrayCopyNode with a dummy new one with a top() control so
491 // that this part of the graph stays consistent but is
492 // eventually removed.
493
494 set_req(0, phase->C->top());
495 remove_dead_region(phase, can_reshape);
496 }
497 } else {
498 if (in(TypeFunc::Control) != ctl) {
499 // we can't return new memory and control from Ideal at parse time
500 assert(!is_clonebasic(), "added control for clone?");
501 phase->record_for_igvn(this);
502 return false;
503 }
504 }
505 return true;
506 }
507
508
509 Node *ArrayCopyNode::Ideal(PhaseGVN *phase, bool can_reshape) {
510 if (remove_dead_region(phase, can_reshape)) return this;
511
512 if (StressArrayCopyMacroNode && !can_reshape) {
513 phase->record_for_igvn(this);
514 return NULL;
515 }
516
517 // See if it's a small array copy and we can inline it as
518 // loads/stores
519 // Here we can only do:
520 // - arraycopy if all arguments were validated before and we don't
|
480 }
481 if (callprojs.fallthrough_memproj != NULL) {
482 igvn->replace_node(callprojs.fallthrough_memproj, mem);
483 }
484 if (callprojs.fallthrough_catchproj != NULL) {
485 igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
486 }
487
488 // The ArrayCopyNode is not disconnected. It still has the
489 // projections for the exception case. Replace current
490 // ArrayCopyNode with a dummy new one with a top() control so
491 // that this part of the graph stays consistent but is
492 // eventually removed.
493
494 set_req(0, phase->C->top());
495 remove_dead_region(phase, can_reshape);
496 }
497 } else {
498 if (in(TypeFunc::Control) != ctl) {
499 // we can't return new memory and control from Ideal at parse time
500 assert(!is_clonebasic() || UseShenandoahGC, "added control for clone?");
501 phase->record_for_igvn(this);
502 return false;
503 }
504 }
505 return true;
506 }
507
508
509 Node *ArrayCopyNode::Ideal(PhaseGVN *phase, bool can_reshape) {
510 if (remove_dead_region(phase, can_reshape)) return this;
511
512 if (StressArrayCopyMacroNode && !can_reshape) {
513 phase->record_for_igvn(this);
514 return NULL;
515 }
516
517 // See if it's a small array copy and we can inline it as
518 // loads/stores
519 // Here we can only do:
520 // - arraycopy if all arguments were validated before and we don't
|