src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6710487 Cdiff src/share/vm/opto/memnode.cpp

src/share/vm/opto/memnode.cpp

Print this page

        

*** 767,785 **** case T_DOUBLE: return new (C, 3) LoadDNode(ctl, mem, adr, adr_type, rt ); case T_ADDRESS: return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr() ); case T_OBJECT: #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop()) { ! const TypeNarrowOop* narrowtype; ! if (rt->isa_narrowoop()) { ! narrowtype = rt->is_narrowoop(); ! } else { ! narrowtype = rt->is_oopptr()->make_narrowoop(); ! } ! Node* load = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, narrowtype)); ! ! return DecodeNNode::decode(&gvn, load); } else #endif { assert(!adr->bottom_type()->is_ptr_to_narrowoop(), "should have got back a narrow oop"); return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr()); --- 767,778 ---- case T_DOUBLE: return new (C, 3) LoadDNode(ctl, mem, adr, adr_type, rt ); case T_ADDRESS: return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr() ); case T_OBJECT: #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop()) { ! Node* load = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, rt->make_narrowoop())); ! return new (C, 2) DecodeNNode(load, load->bottom_type()->make_ptr()); } else #endif { assert(!adr->bottom_type()->is_ptr_to_narrowoop(), "should have got back a narrow oop"); return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr());
*** 1629,1641 **** // sanity check the alias category against the created node type const TypeOopPtr *adr_type = adr->bottom_type()->isa_oopptr(); assert(adr_type != NULL, "expecting TypeOopPtr"); #ifdef _LP64 if (adr_type->is_ptr_to_narrowoop()) { ! const TypeNarrowOop* narrowtype = tk->is_oopptr()->make_narrowoop(); ! Node* load_klass = gvn.transform(new (C, 3) LoadNKlassNode(ctl, mem, adr, at, narrowtype)); ! return DecodeNNode::decode(&gvn, load_klass); } #endif assert(!adr_type->is_ptr_to_narrowoop(), "should have got back a narrow oop"); return new (C, 3) LoadKlassNode(ctl, mem, adr, at, tk); } --- 1622,1633 ---- // sanity check the alias category against the created node type const TypeOopPtr *adr_type = adr->bottom_type()->isa_oopptr(); assert(adr_type != NULL, "expecting TypeOopPtr"); #ifdef _LP64 if (adr_type->is_ptr_to_narrowoop()) { ! Node* load_klass = gvn.transform(new (C, 3) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowoop())); ! return new (C, 2) DecodeNNode(load_klass, load_klass->bottom_type()->make_ptr()); } #endif assert(!adr_type->is_ptr_to_narrowoop(), "should have got back a narrow oop"); return new (C, 3) LoadKlassNode(ctl, mem, adr, at, tk); }
*** 1841,1859 **** //------------------------------Value------------------------------------------ const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const { const Type *t = klass_value_common(phase); ! ! if (t == TypePtr::NULL_PTR) { ! return TypeNarrowOop::NULL_PTR; ! } ! if (t != Type::TOP && !t->isa_narrowoop()) { ! assert(t->is_oopptr(), "sanity"); ! t = t->is_oopptr()->make_narrowoop(); ! } return t; } //------------------------------Identity--------------------------------------- // To clean up reflective code, simplify k.java_mirror.as_klass to narrow k. // Also feed through the klass in Allocate(...klass...)._klass. --- 1833,1846 ---- //------------------------------Value------------------------------------------ const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const { const Type *t = klass_value_common(phase); ! if (t == Type::TOP) return t; + + return t->make_narrowoop(); } //------------------------------Identity--------------------------------------- // To clean up reflective code, simplify k.java_mirror.as_klass to narrow k. // Also feed through the klass in Allocate(...klass...)._klass.
*** 1862,1872 **** const Type *t = phase->type( x ); if( t == Type::TOP ) return x; if( t->isa_narrowoop()) return x; ! return EncodePNode::encode(phase, x); } //------------------------------Value----------------------------------------- const Type *LoadRangeNode::Value( PhaseTransform *phase ) const { // Either input is TOP ==> the result is TOP --- 1849,1859 ---- const Type *t = phase->type( x ); if( t == Type::TOP ) return x; if( t->isa_narrowoop()) return x; ! return phase->transform(new (phase->C, 2) EncodePNode(x, t->make_narrowoop())); } //------------------------------Value----------------------------------------- const Type *LoadRangeNode::Value( PhaseTransform *phase ) const { // Either input is TOP ==> the result is TOP
*** 1928,1940 **** case T_OBJECT: #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop() || (UseCompressedOops && val->bottom_type()->isa_klassptr() && adr->bottom_type()->isa_rawptr())) { ! const TypePtr* type = val->bottom_type()->is_ptr(); ! Node* cp = EncodePNode::encode(&gvn, val); ! return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, cp); } else #endif { return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val); } --- 1915,1926 ---- case T_OBJECT: #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop() || (UseCompressedOops && val->bottom_type()->isa_klassptr() && adr->bottom_type()->isa_rawptr())) { ! val = gvn.transform(new (C, 2) EncodePNode(val, val->bottom_type()->make_narrowoop())); ! return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, val); } else #endif { return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val); }
src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File