< prev index next >

src/hotspot/share/opto/parse1.cpp

Print this page

        

*** 124,141 **** case T_FLOAT: l = new LoadFNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::FLOAT, MemNode::unordered); break; case T_ADDRESS: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered); break; case T_OBJECT: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM, MemNode::unordered); break; case T_VALUETYPE: { // Load oop and create a new ValueTypeNode ! const TypeValueTypePtr* vtptr_type = TypeValueTypePtr::make(TypePtr::NotNull, type->is_valuetype()->value_klass()); ! l = _gvn.transform(new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, vtptr_type, MemNode::unordered)); // Value type oop may point to the TLVB ! l = ValueTypeNode::make_from_oop(this, l, vtptr_type->value_klass(), /* null_check */ false, /* buffer_check */ true); break; } case T_VALUETYPEPTR: { ! l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeValueTypePtr::NOTNULL, MemNode::unordered); break; } case T_LONG: case T_DOUBLE: { // Since arguments are in reverse order, the argument address 'adr' --- 124,141 ---- case T_FLOAT: l = new LoadFNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::FLOAT, MemNode::unordered); break; case T_ADDRESS: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered); break; case T_OBJECT: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM, MemNode::unordered); break; case T_VALUETYPE: { // Load oop and create a new ValueTypeNode ! const TypeInstPtr* ptr_type = TypeInstPtr::make(TypePtr::NotNull, type->is_valuetype()->value_klass()); ! l = _gvn.transform(new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, ptr_type, MemNode::unordered)); // Value type oop may point to the TLVB ! l = ValueTypeNode::make_from_oop(this, l, type->is_valuetype()->value_klass(), /* null_check */ false, /* buffer_check */ true); break; } case T_VALUETYPEPTR: { ! l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::NOTNULL, MemNode::unordered); break; } case T_LONG: case T_DOUBLE: { // Since arguments are in reverse order, the argument address 'adr'
*** 608,619 **** // Handle value type arguments int arg_size_sig = tf()->domain_sig()->cnt(); for (uint i = 0; i < (uint)arg_size_sig; i++) { Node* parm = map()->in(i); ! const TypeValueTypePtr* vtptr = _gvn.type(parm)->isa_valuetypeptr(); ! if (vtptr != NULL) { // Create ValueTypeNode from the oop and replace the parameter Node* null_ctl = top(); Node* not_null_obj = null_check_common(parm, T_VALUETYPE, false, &null_ctl, false); if (null_ctl != top()) { // TODO For now, we just deoptimize if value type is NULL --- 608,619 ---- // Handle value type arguments int arg_size_sig = tf()->domain_sig()->cnt(); for (uint i = 0; i < (uint)arg_size_sig; i++) { Node* parm = map()->in(i); ! const Type* t = _gvn.type(parm); ! if (t->is_valuetypeptr()) { // Create ValueTypeNode from the oop and replace the parameter Node* null_ctl = top(); Node* not_null_obj = null_check_common(parm, T_VALUETYPE, false, &null_ctl, false); if (null_ctl != top()) { // TODO For now, we just deoptimize if value type is NULL
*** 621,631 **** set_control(null_ctl); replace_in_map(parm, null()); uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); } // Value type oop may point to the TLVB ! Node* vt = ValueTypeNode::make_from_oop(this, not_null_obj, vtptr->value_klass(), /* null_check */ false, /* buffer_check */ true); map()->replace_edge(parm, vt); } } entry_map = map(); // capture any changes performed by method setup code --- 621,631 ---- set_control(null_ctl); replace_in_map(parm, null()); uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); } // Value type oop may point to the TLVB ! Node* vt = ValueTypeNode::make_from_oop(this, not_null_obj, t->value_klass(), /* null_check */ false, /* buffer_check */ true); map()->replace_edge(parm, vt); } } entry_map = map(); // capture any changes performed by method setup code
*** 825,839 **** // types will not join when we transform and push in do_exits(). const TypeOopPtr* ret_oop_type = ret_type->isa_oopptr(); if (ret_oop_type && !ret_oop_type->klass()->is_loaded()) { ret_type = TypeOopPtr::BOTTOM; } ! if ((_caller->has_method() || tf()->returns_value_type_as_fields()) && ! ret_type->isa_valuetypeptr() && !ret_type->is_valuetypeptr()->is__Value()) { // When inlining or with multiple return values: return value // type as ValueTypeNode not as oop ! ret_type = TypeValueType::make(ret_type->is_valuetypeptr()->value_klass()); } int ret_size = type2size[ret_type->basic_type()]; Node* ret_phi = new PhiNode(region, ret_type); gvn().set_type_bottom(ret_phi); _exits.ensure_stack(ret_size); --- 825,838 ---- // types will not join when we transform and push in do_exits(). const TypeOopPtr* ret_oop_type = ret_type->isa_oopptr(); if (ret_oop_type && !ret_oop_type->klass()->is_loaded()) { ret_type = TypeOopPtr::BOTTOM; } ! if ((_caller->has_method() || tf()->returns_value_type_as_fields()) && ret_type->is_valuetypeptr()) { // When inlining or with multiple return values: return value // type as ValueTypeNode not as oop ! ret_type = TypeValueType::make(ret_type->value_klass()); } int ret_size = type2size[ret_type->basic_type()]; Node* ret_phi = new PhiNode(region, ret_type); gvn().set_type_bottom(ret_phi); _exits.ensure_stack(ret_size);
*** 878,889 **** } else { // Value type arguments are not passed by reference: we get an // argument per field of the value type. Build ValueTypeNodes // from the value type arguments. const Type* t = tf->domain_sig()->field_at(i); ! if (t->isa_valuetypeptr() && !t->is_valuetypeptr()->is__Value()) { ! ciValueKlass* vk = t->is_valuetypeptr()->value_klass(); Node* ctl = map->control(); ValueTypeNode* vt = ValueTypeNode::make_from_multi(gvn, ctl, map->memory(), start, vk, j, true); map->set_control(ctl); map->init_req(i, vt); j += vk->value_arg_slots(); --- 877,888 ---- } else { // Value type arguments are not passed by reference: we get an // argument per field of the value type. Build ValueTypeNodes // from the value type arguments. const Type* t = tf->domain_sig()->field_at(i); ! if (t->is_valuetypeptr()) { ! ciValueKlass* vk = t->value_klass(); Node* ctl = map->control(); ValueTypeNode* vt = ValueTypeNode::make_from_multi(gvn, ctl, map->memory(), start, vk, j, true); map->set_control(ctl); map->init_req(i, vt); j += vk->value_arg_slots();
*** 1131,1141 **** } if (ret_type->isa_int()) { BasicType ret_bt = method()->return_type()->basic_type(); ret_phi = mask_int_value(ret_phi, ret_bt, &_gvn); } ! if (_caller->has_method() && ret_type->isa_valuetypeptr()) { // Inlined methods return a ValueTypeNode _exits.push_node(T_VALUETYPE, ret_phi); } else { _exits.push_node(ret_type->basic_type(), ret_phi); } --- 1130,1140 ---- } if (ret_type->isa_int()) { BasicType ret_bt = method()->return_type()->basic_type(); ret_phi = mask_int_value(ret_phi, ret_bt, &_gvn); } ! if (_caller->has_method() && ret_type->is_valuetypeptr()) { // Inlined methods return a ValueTypeNode _exits.push_node(T_VALUETYPE, ret_phi); } else { _exits.push_node(ret_type->basic_type(), ret_phi); }
< prev index next >