923 }
924 #endif
925 _igvn.replace_node(n, n->in(MemNode::Memory));
926 } else if (n->is_ArrayCopy()) {
927 // Disconnect ArrayCopy node
928 ArrayCopyNode* ac = n->as_ArrayCopy();
929 assert(ac->is_clonebasic(), "unexpected array copy kind");
930 Node* membar_after = ac->proj_out(TypeFunc::Control)->unique_ctrl_out();
931 disconnect_projections(ac, _igvn);
932 assert(alloc->in(0)->is_Proj() && alloc->in(0)->in(0)->Opcode() == Op_MemBarCPUOrder, "mem barrier expected before allocation");
933 Node* membar_before = alloc->in(0)->in(0);
934 disconnect_projections(membar_before->as_MemBar(), _igvn);
935 if (membar_after->is_MemBar()) {
936 disconnect_projections(membar_after->as_MemBar(), _igvn);
937 }
938 } else {
939 eliminate_gc_barrier(n);
940 }
941 k -= (oc2 - use->outcnt());
942 }
943 } else if (use->is_ArrayCopy()) {
944 // Disconnect ArrayCopy node
945 ArrayCopyNode* ac = use->as_ArrayCopy();
946 assert(ac->is_arraycopy_validated() ||
947 ac->is_copyof_validated() ||
948 ac->is_copyofrange_validated(), "unsupported");
949 CallProjections callprojs;
950 ac->extract_projections(&callprojs, true);
951
952 _igvn.replace_node(callprojs.fallthrough_ioproj, ac->in(TypeFunc::I_O));
953 _igvn.replace_node(callprojs.fallthrough_memproj, ac->in(TypeFunc::Memory));
954 _igvn.replace_node(callprojs.fallthrough_catchproj, ac->in(TypeFunc::Control));
955
956 // Set control to top. IGVN will remove the remaining projections
957 ac->set_req(0, top());
958 ac->replace_edge(res, top());
959
960 // Disconnect src right away: it can help find new
961 // opportunities for allocation elimination
962 Node* src = ac->in(ArrayCopyNode::Src);
|
923 }
924 #endif
925 _igvn.replace_node(n, n->in(MemNode::Memory));
926 } else if (n->is_ArrayCopy()) {
927 // Disconnect ArrayCopy node
928 ArrayCopyNode* ac = n->as_ArrayCopy();
929 assert(ac->is_clonebasic(), "unexpected array copy kind");
930 Node* membar_after = ac->proj_out(TypeFunc::Control)->unique_ctrl_out();
931 disconnect_projections(ac, _igvn);
932 assert(alloc->in(0)->is_Proj() && alloc->in(0)->in(0)->Opcode() == Op_MemBarCPUOrder, "mem barrier expected before allocation");
933 Node* membar_before = alloc->in(0)->in(0);
934 disconnect_projections(membar_before->as_MemBar(), _igvn);
935 if (membar_after->is_MemBar()) {
936 disconnect_projections(membar_after->as_MemBar(), _igvn);
937 }
938 } else {
939 eliminate_gc_barrier(n);
940 }
941 k -= (oc2 - use->outcnt());
942 }
943 _igvn.remove_dead_node(use);
944 } else if (use->is_ArrayCopy()) {
945 // Disconnect ArrayCopy node
946 ArrayCopyNode* ac = use->as_ArrayCopy();
947 assert(ac->is_arraycopy_validated() ||
948 ac->is_copyof_validated() ||
949 ac->is_copyofrange_validated(), "unsupported");
950 CallProjections callprojs;
951 ac->extract_projections(&callprojs, true);
952
953 _igvn.replace_node(callprojs.fallthrough_ioproj, ac->in(TypeFunc::I_O));
954 _igvn.replace_node(callprojs.fallthrough_memproj, ac->in(TypeFunc::Memory));
955 _igvn.replace_node(callprojs.fallthrough_catchproj, ac->in(TypeFunc::Control));
956
957 // Set control to top. IGVN will remove the remaining projections
958 ac->set_req(0, top());
959 ac->replace_edge(res, top());
960
961 // Disconnect src right away: it can help find new
962 // opportunities for allocation elimination
963 Node* src = ac->in(ArrayCopyNode::Src);
|