equal
deleted
inserted
replaced
960 TypeNode *tn = n->as_Type(); |
960 TypeNode *tn = n->as_Type(); |
961 tinst = igvn->type(val)->isa_oopptr(); |
961 tinst = igvn->type(val)->isa_oopptr(); |
962 assert(tinst != NULL && tinst->is_instance() && |
962 assert(tinst != NULL && tinst->is_instance() && |
963 tinst->instance_id() == elem , "instance type expected."); |
963 tinst->instance_id() == elem , "instance type expected."); |
964 |
964 |
965 const TypeOopPtr *tn_t = NULL; |
|
966 const Type *tn_type = igvn->type(tn); |
965 const Type *tn_type = igvn->type(tn); |
967 if (tn_type->isa_narrowoop()) { |
966 const TypeOopPtr *tn_t = tn_type->make_ptr()->isa_oopptr(); |
968 tn_t = tn_type->is_narrowoop()->make_oopptr()->isa_oopptr(); |
|
969 } else { |
|
970 tn_t = tn_type->isa_oopptr(); |
|
971 } |
|
972 |
967 |
973 if (tn_t != NULL && |
968 if (tn_t != NULL && |
974 tinst->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE)->higher_equal(tn_t)) { |
969 tinst->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE)->higher_equal(tn_t)) { |
975 if (tn_type->isa_narrowoop()) { |
970 if (tn_type->isa_narrowoop()) { |
976 tn_type = tinst->make_narrowoop(); |
971 tn_type = tinst->make_narrowoop(); |
1919 } |
1914 } |
1920 case Op_StoreP: |
1915 case Op_StoreP: |
1921 case Op_StoreN: |
1916 case Op_StoreN: |
1922 { |
1917 { |
1923 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1918 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1924 if (adr_type->isa_narrowoop()) { |
1919 adr_type = adr_type->make_ptr(); |
1925 adr_type = adr_type->is_narrowoop()->make_oopptr(); |
|
1926 } |
|
1927 if (adr_type->isa_oopptr()) { |
1920 if (adr_type->isa_oopptr()) { |
1928 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1921 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1929 } else { |
1922 } else { |
1930 Node* adr = n->in(MemNode::Address); |
1923 Node* adr = n->in(MemNode::Address); |
1931 if (adr->is_AddP() && phase->type(adr) == TypeRawPtr::NOTNULL && |
1924 if (adr->is_AddP() && phase->type(adr) == TypeRawPtr::NOTNULL && |
1946 case Op_StorePConditional: |
1939 case Op_StorePConditional: |
1947 case Op_CompareAndSwapP: |
1940 case Op_CompareAndSwapP: |
1948 case Op_CompareAndSwapN: |
1941 case Op_CompareAndSwapN: |
1949 { |
1942 { |
1950 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1943 const Type *adr_type = phase->type(n->in(MemNode::Address)); |
1951 if (adr_type->isa_narrowoop()) { |
1944 adr_type = adr_type->make_ptr(); |
1952 adr_type = adr_type->is_narrowoop()->make_oopptr(); |
|
1953 } |
|
1954 if (adr_type->isa_oopptr()) { |
1945 if (adr_type->isa_oopptr()) { |
1955 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1946 add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false); |
1956 } else { |
1947 } else { |
1957 _processed.set(n->_idx); |
1948 _processed.set(n->_idx); |
1958 return; |
1949 return; |
2129 case Op_StorePConditional: |
2120 case Op_StorePConditional: |
2130 case Op_CompareAndSwapP: |
2121 case Op_CompareAndSwapP: |
2131 case Op_CompareAndSwapN: |
2122 case Op_CompareAndSwapN: |
2132 { |
2123 { |
2133 Node *adr = n->in(MemNode::Address); |
2124 Node *adr = n->in(MemNode::Address); |
2134 const Type *adr_type = phase->type(adr); |
2125 const Type *adr_type = phase->type(adr)->make_ptr(); |
2135 if (adr_type->isa_narrowoop()) { |
|
2136 adr_type = adr_type->is_narrowoop()->make_oopptr(); |
|
2137 } |
|
2138 #ifdef ASSERT |
2126 #ifdef ASSERT |
2139 if (!adr_type->isa_oopptr()) |
2127 if (!adr_type->isa_oopptr()) |
2140 assert(phase->type(adr) == TypeRawPtr::NOTNULL, "Op_StoreP"); |
2128 assert(phase->type(adr) == TypeRawPtr::NOTNULL, "Op_StoreP"); |
2141 #endif |
2129 #endif |
2142 |
2130 |