Mercurial > hg > truffle
comparison src/share/vm/opto/memnode.cpp @ 124:b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
Summary: 64-bits VM crashes with -XX:+AggresiveOpts (Escape Analysis + Compressed Oops)
Reviewed-by: never, sgoldman
author | kvn |
---|---|
date | Wed, 23 Apr 2008 11:20:36 -0700 |
parents | d1a5218d7eaf |
children | a76240c8b133 |
comparison
equal
deleted
inserted
replaced
123:9e5a7340635e | 124:b130b98db9cf |
---|---|
752 #ifdef _LP64 | 752 #ifdef _LP64 |
753 if (adr->bottom_type()->is_narrow()) { | 753 if (adr->bottom_type()->is_narrow()) { |
754 const TypeNarrowOop* narrowtype; | 754 const TypeNarrowOop* narrowtype; |
755 if (rt->isa_narrowoop()) { | 755 if (rt->isa_narrowoop()) { |
756 narrowtype = rt->is_narrowoop(); | 756 narrowtype = rt->is_narrowoop(); |
757 rt = narrowtype->make_oopptr(); | |
758 } else { | 757 } else { |
759 narrowtype = rt->is_oopptr()->make_narrowoop(); | 758 narrowtype = rt->is_oopptr()->make_narrowoop(); |
760 } | 759 } |
761 Node* load = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, narrowtype)); | 760 Node* load = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, narrowtype)); |
762 | 761 |
763 return new (C, 2) DecodeNNode(load, rt); | 762 return DecodeNNode::decode(&gvn, load); |
764 } else | 763 } else |
765 #endif | 764 #endif |
766 { | 765 { |
767 assert(!adr->bottom_type()->is_narrow(), "should have got back a narrow oop"); | 766 assert(!adr->bottom_type()->is_narrow(), "should have got back a narrow oop"); |
768 return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr()); | 767 return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr()); |
1839 #ifdef _LP64 | 1838 #ifdef _LP64 |
1840 if (adr->bottom_type()->is_narrow() || | 1839 if (adr->bottom_type()->is_narrow() || |
1841 (UseCompressedOops && val->bottom_type()->isa_klassptr() && | 1840 (UseCompressedOops && val->bottom_type()->isa_klassptr() && |
1842 adr->bottom_type()->isa_rawptr())) { | 1841 adr->bottom_type()->isa_rawptr())) { |
1843 const TypePtr* type = val->bottom_type()->is_ptr(); | 1842 const TypePtr* type = val->bottom_type()->is_ptr(); |
1844 Node* cp; | 1843 Node* cp = EncodePNode::encode(&gvn, val); |
1845 if (type->isa_oopptr()) { | |
1846 const TypeNarrowOop* etype = type->is_oopptr()->make_narrowoop(); | |
1847 cp = gvn.transform(new (C, 2) EncodePNode(val, etype)); | |
1848 } else if (type == TypePtr::NULL_PTR) { | |
1849 cp = gvn.transform(new (C, 1) ConNNode(TypeNarrowOop::NULL_PTR)); | |
1850 } else { | |
1851 ShouldNotReachHere(); | |
1852 } | |
1853 return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, cp); | 1844 return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, cp); |
1854 } else | 1845 } else |
1855 #endif | 1846 #endif |
1856 { | 1847 { |
1857 return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val); | 1848 return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val); |