949 }
950 } else if (field_val->is_ValueType()) {
951 // Keep track of value types to scalarize them later
952 value_worklist.push(field_val);
953 }
954 sfpt->add_req(field_val);
955 }
956 JVMState *jvms = sfpt->jvms();
957 jvms->set_endoff(sfpt->req());
958 // Now make a pass over the debug information replacing any references
959 // to the allocated object with "sobj"
960 int start = jvms->debug_start();
961 int end = jvms->debug_end();
962 sfpt->replace_edges_in_range(res, sobj, start, end);
963 _igvn._worklist.push(sfpt);
964 safepoints_done.append_if_missing(sfpt); // keep it for rollback
965 }
966 // Scalarize value types that were added to the safepoint
967 for (uint i = 0; i < value_worklist.size(); ++i) {
968 Node* vt = value_worklist.at(i);
969 vt->as_ValueType()->make_scalar_in_safepoints(C->root(), &_igvn);
970 }
971 return true;
972 }
973
974 static void disconnect_projections(MultiNode* n, PhaseIterGVN& igvn) {
975 Node* ctl_proj = n->proj_out_or_null(TypeFunc::Control);
976 Node* mem_proj = n->proj_out_or_null(TypeFunc::Memory);
977 if (ctl_proj != NULL) {
978 igvn.replace_node(ctl_proj, n->in(0));
979 }
980 if (mem_proj != NULL) {
981 igvn.replace_node(mem_proj, n->in(TypeFunc::Memory));
982 }
983 }
984
985 // Process users of eliminated allocation.
986 void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
987 Node* res = alloc->result_cast();
988 if (res != NULL) {
989 for (DUIterator_Last jmin, j = res->last_outs(jmin); j >= jmin; ) {
|
949 }
950 } else if (field_val->is_ValueType()) {
951 // Keep track of value types to scalarize them later
952 value_worklist.push(field_val);
953 }
954 sfpt->add_req(field_val);
955 }
956 JVMState *jvms = sfpt->jvms();
957 jvms->set_endoff(sfpt->req());
958 // Now make a pass over the debug information replacing any references
959 // to the allocated object with "sobj"
960 int start = jvms->debug_start();
961 int end = jvms->debug_end();
962 sfpt->replace_edges_in_range(res, sobj, start, end);
963 _igvn._worklist.push(sfpt);
964 safepoints_done.append_if_missing(sfpt); // keep it for rollback
965 }
966 // Scalarize value types that were added to the safepoint
967 for (uint i = 0; i < value_worklist.size(); ++i) {
968 Node* vt = value_worklist.at(i);
969 vt->as_ValueType()->make_scalar_in_safepoints(&_igvn);
970 }
971 return true;
972 }
973
974 static void disconnect_projections(MultiNode* n, PhaseIterGVN& igvn) {
975 Node* ctl_proj = n->proj_out_or_null(TypeFunc::Control);
976 Node* mem_proj = n->proj_out_or_null(TypeFunc::Memory);
977 if (ctl_proj != NULL) {
978 igvn.replace_node(ctl_proj, n->in(0));
979 }
980 if (mem_proj != NULL) {
981 igvn.replace_node(mem_proj, n->in(TypeFunc::Memory));
982 }
983 }
984
985 // Process users of eliminated allocation.
986 void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
987 Node* res = alloc->result_cast();
988 if (res != NULL) {
989 for (DUIterator_Last jmin, j = res->last_outs(jmin); j >= jmin; ) {
|