comparison src/share/vm/opto/escape.cpp @ 168:7793bd37a336

6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops Summary: Generate addresses and implicit null checks with narrow oops to avoid decoding. Reviewed-by: jrose, never
author kvn
date Thu, 29 May 2008 12:04:14 -0700
parents c436414a719e
children d1605aabd0a1 1e026f8da827
comparison
equal deleted inserted replaced
167:feeb96a45707 168:7793bd37a336
426 // 426 //
427 Node *base = addp->in(AddPNode::Base)->uncast(); 427 Node *base = addp->in(AddPNode::Base)->uncast();
428 if (base->is_top()) { // The AddP case #3 and #6. 428 if (base->is_top()) { // The AddP case #3 and #6.
429 base = addp->in(AddPNode::Address)->uncast(); 429 base = addp->in(AddPNode::Address)->uncast();
430 assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal || 430 assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal ||
431 base->Opcode() == Op_CastX2P || base->Opcode() == Op_DecodeN || 431 base->Opcode() == Op_CastX2P || base->is_DecodeN() ||
432 (base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) || 432 (base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) ||
433 (base->is_Proj() && base->in(0)->is_Allocate()), "sanity"); 433 (base->is_Proj() && base->in(0)->is_Allocate()), "sanity");
434 } 434 }
435 return base; 435 return base;
436 } 436 }
941 Node *base = get_map(elem); // CheckCastPP node 941 Node *base = get_map(elem); // CheckCastPP node
942 split_AddP(n, base, igvn); 942 split_AddP(n, base, igvn);
943 tinst = igvn->type(base)->isa_oopptr(); 943 tinst = igvn->type(base)->isa_oopptr();
944 } else if (n->is_Phi() || 944 } else if (n->is_Phi() ||
945 n->is_CheckCastPP() || 945 n->is_CheckCastPP() ||
946 n->Opcode() == Op_EncodeP || 946 n->is_EncodeP() ||
947 n->Opcode() == Op_DecodeN || 947 n->is_DecodeN() ||
948 (n->is_ConstraintCast() && n->Opcode() == Op_CastPP)) { 948 (n->is_ConstraintCast() && n->Opcode() == Op_CastPP)) {
949 if (visited.test_set(n->_idx)) { 949 if (visited.test_set(n->_idx)) {
950 assert(n->is_Phi(), "loops only through Phi's"); 950 assert(n->is_Phi(), "loops only through Phi's");
951 continue; // already processed 951 continue; // already processed
952 } 952 }
1014 alloc_worklist.append_if_missing(addp2); 1014 alloc_worklist.append_if_missing(addp2);
1015 } 1015 }
1016 alloc_worklist.append_if_missing(use); 1016 alloc_worklist.append_if_missing(use);
1017 } else if (use->is_Phi() || 1017 } else if (use->is_Phi() ||
1018 use->is_CheckCastPP() || 1018 use->is_CheckCastPP() ||
1019 use->Opcode() == Op_EncodeP || 1019 use->is_EncodeP() ||
1020 use->Opcode() == Op_DecodeN || 1020 use->is_DecodeN() ||
1021 (use->is_ConstraintCast() && use->Opcode() == Op_CastPP)) { 1021 (use->is_ConstraintCast() && use->Opcode() == Op_CastPP)) {
1022 alloc_worklist.append_if_missing(use); 1022 alloc_worklist.append_if_missing(use);
1023 } 1023 }
1024 } 1024 }
1025 1025