1915 return result;
1916 }
1917 }
1918 //
1919 // Other optimizations on the memory chain
1920 //
1921 const TypePtr* at = adr_type();
1922 for( uint i=1; i<req(); ++i ) {// For all paths in
1923 Node *ii = in(i);
1924 Node *new_in = MemNode::optimize_memory_chain(ii, at, NULL, phase);
1925 if (ii != new_in ) {
1926 set_req(i, new_in);
1927 progress = this;
1928 }
1929 }
1930 }
1931
1932 #ifdef _LP64
1933 // Push DecodeN/DecodeNKlass down through phi.
1934 // The rest of phi graph will transform by split EncodeP node though phis up.
1935 if ((UseCompressedOops || UseCompressedKlassPointers) && can_reshape && progress == NULL) {
1936 bool may_push = true;
1937 bool has_decodeN = false;
1938 bool is_decodeN = false;
1939 for (uint i=1; i<req(); ++i) {// For all paths in
1940 Node *ii = in(i);
1941 if (ii->is_DecodeNarrowPtr() && ii->bottom_type() == bottom_type()) {
1942 // Do optimization if a non dead path exist.
1943 if (ii->in(1)->bottom_type() != Type::TOP) {
1944 has_decodeN = true;
1945 is_decodeN = ii->is_DecodeN();
1946 }
1947 } else if (!ii->is_Phi()) {
1948 may_push = false;
1949 }
1950 }
1951
1952 if (has_decodeN && may_push) {
1953 PhaseIterGVN *igvn = phase->is_IterGVN();
1954 // Make narrow type for new phi.
1955 const Type* narrow_t;
|
1915 return result;
1916 }
1917 }
1918 //
1919 // Other optimizations on the memory chain
1920 //
1921 const TypePtr* at = adr_type();
1922 for( uint i=1; i<req(); ++i ) {// For all paths in
1923 Node *ii = in(i);
1924 Node *new_in = MemNode::optimize_memory_chain(ii, at, NULL, phase);
1925 if (ii != new_in ) {
1926 set_req(i, new_in);
1927 progress = this;
1928 }
1929 }
1930 }
1931
1932 #ifdef _LP64
1933 // Push DecodeN/DecodeNKlass down through phi.
1934 // The rest of phi graph will transform by split EncodeP node though phis up.
1935 if ((UseCompressedOops || UseCompressedClassPointers) && can_reshape && progress == NULL) {
1936 bool may_push = true;
1937 bool has_decodeN = false;
1938 bool is_decodeN = false;
1939 for (uint i=1; i<req(); ++i) {// For all paths in
1940 Node *ii = in(i);
1941 if (ii->is_DecodeNarrowPtr() && ii->bottom_type() == bottom_type()) {
1942 // Do optimization if a non dead path exist.
1943 if (ii->in(1)->bottom_type() != Type::TOP) {
1944 has_decodeN = true;
1945 is_decodeN = ii->is_DecodeN();
1946 }
1947 } else if (!ii->is_Phi()) {
1948 may_push = false;
1949 }
1950 }
1951
1952 if (has_decodeN && may_push) {
1953 PhaseIterGVN *igvn = phase->is_IterGVN();
1954 // Make narrow type for new phi.
1955 const Type* narrow_t;
|