Mercurial > hg > truffle
comparison src/share/vm/opto/escape.cpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | f96100ac3d12 |
children | b130b98db9cf |
comparison
equal
deleted
inserted
replaced
110:a49a647afe9a | 113:ba764ed4b6f2 |
---|---|
1747 { | 1747 { |
1748 // assume that all exception objects globally escape | 1748 // assume that all exception objects globally escape |
1749 add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true); | 1749 add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true); |
1750 break; | 1750 break; |
1751 } | 1751 } |
1752 case Op_ConN: | |
1753 { | |
1754 // assume all narrow oop constants globally escape except for null | |
1755 PointsToNode::EscapeState es; | |
1756 if (phase->type(n) == TypeNarrowOop::NULL_PTR) | |
1757 es = PointsToNode::NoEscape; | |
1758 else | |
1759 es = PointsToNode::GlobalEscape; | |
1760 | |
1761 add_node(n, PointsToNode::JavaObject, es, true); | |
1762 break; | |
1763 } | |
1752 case Op_LoadKlass: | 1764 case Op_LoadKlass: |
1753 { | 1765 { |
1754 add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true); | 1766 add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true); |
1755 break; | 1767 break; |
1756 } | 1768 } |
1757 case Op_LoadP: | 1769 case Op_LoadP: |
1770 case Op_LoadN: | |
1758 { | 1771 { |
1759 const Type *t = phase->type(n); | 1772 const Type *t = phase->type(n); |
1760 if (t->isa_ptr() == NULL) { | 1773 if (!t->isa_narrowoop() && t->isa_ptr() == NULL) { |
1761 _processed.set(n->_idx); | 1774 _processed.set(n->_idx); |
1762 return; | 1775 return; |
1763 } | 1776 } |
1764 add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false); | 1777 add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false); |
1765 break; | 1778 break; |
1845 } | 1858 } |
1846 _processed.set(n->_idx); | 1859 _processed.set(n->_idx); |
1847 break; | 1860 break; |
1848 } | 1861 } |
1849 case Op_StoreP: | 1862 case Op_StoreP: |
1863 case Op_StoreN: | |
1850 { | 1864 { |
1851 const Type *adr_type = phase->type(n->in(MemNode::Address)); | 1865 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1866 if (adr_type->isa_narrowoop()) { | |
1867 adr_type = adr_type->is_narrowoop()->make_oopptr(); | |
1868 } | |
1852 if (adr_type->isa_oopptr()) { | 1869 if (adr_type->isa_oopptr()) { |
1853 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); | 1870 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1854 } else { | 1871 } else { |
1855 Node* adr = n->in(MemNode::Address); | 1872 Node* adr = n->in(MemNode::Address); |
1856 if (adr->is_AddP() && phase->type(adr) == TypeRawPtr::NOTNULL && | 1873 if (adr->is_AddP() && phase->type(adr) == TypeRawPtr::NOTNULL && |
1868 } | 1885 } |
1869 break; | 1886 break; |
1870 } | 1887 } |
1871 case Op_StorePConditional: | 1888 case Op_StorePConditional: |
1872 case Op_CompareAndSwapP: | 1889 case Op_CompareAndSwapP: |
1890 case Op_CompareAndSwapN: | |
1873 { | 1891 { |
1874 const Type *adr_type = phase->type(n->in(MemNode::Address)); | 1892 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1893 if (adr_type->isa_narrowoop()) { | |
1894 adr_type = adr_type->is_narrowoop()->make_oopptr(); | |
1895 } | |
1875 if (adr_type->isa_oopptr()) { | 1896 if (adr_type->isa_oopptr()) { |
1876 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); | 1897 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1877 } else { | 1898 } else { |
1878 _processed.set(n->_idx); | 1899 _processed.set(n->_idx); |
1879 return; | 1900 return; |
1925 assert(false, "Op_CastX2P"); | 1946 assert(false, "Op_CastX2P"); |
1926 break; | 1947 break; |
1927 } | 1948 } |
1928 case Op_CastPP: | 1949 case Op_CastPP: |
1929 case Op_CheckCastPP: | 1950 case Op_CheckCastPP: |
1951 case Op_EncodeP: | |
1952 case Op_DecodeN: | |
1930 { | 1953 { |
1931 int ti = n->in(1)->_idx; | 1954 int ti = n->in(1)->_idx; |
1932 if (_nodes->adr_at(ti)->node_type() == PointsToNode::JavaObject) { | 1955 if (_nodes->adr_at(ti)->node_type() == PointsToNode::JavaObject) { |
1933 add_pointsto_edge(n->_idx, ti); | 1956 add_pointsto_edge(n->_idx, ti); |
1934 } else { | 1957 } else { |