< prev index next >

src/hotspot/share/opto/escape.cpp

Print this page
*** 3471,11 ***
        // OffsetBot is used to reference array's element. Ignore first AddP.
        if (find_second_addp(n, n->in(AddPNode::Base)) == nullptr) {
          bt = T_OBJECT;
        }
      }
!   } else if (offset != oopDesc::klass_offset_in_bytes()) {
      if (adr_type->isa_instptr()) {
        ciField* field = _compile->alias_type(adr_type->isa_instptr())->field();
        if (field != nullptr) {
          bt = field->layout_type();
        } else {
--- 3471,11 ---
        // OffsetBot is used to reference array's element. Ignore first AddP.
        if (find_second_addp(n, n->in(AddPNode::Base)) == nullptr) {
          bt = T_OBJECT;
        }
      }
!   } else if (offset != Type::klass_offset()) {
      if (adr_type->isa_instptr()) {
        ciField* field = _compile->alias_type(adr_type->isa_instptr())->field();
        if (field != nullptr) {
          bt = field->layout_type();
        } else {

*** 4475,11 ***
        record_for_optimizer(n);
        // Allocate an alias index for the header fields. Accesses to
        // the header emitted during macro expansion wouldn't have
        // correct memory state otherwise.
        _compile->get_alias_index(tinst->add_offset(oopDesc::mark_offset_in_bytes()));
!       _compile->get_alias_index(tinst->add_offset(oopDesc::klass_offset_in_bytes()));
        if (alloc->is_Allocate() && (t->isa_instptr() || t->isa_aryptr())) {
          // Add a new NarrowMem projection for each existing NarrowMem projection with new adr type
          InitializeNode* init = alloc->as_Allocate()->initialization();
          assert(init != nullptr, "can't find Initialization node for this Allocate node");
          auto process_narrow_proj = [&](NarrowMemProjNode* proj) {
--- 4475,11 ---
        record_for_optimizer(n);
        // Allocate an alias index for the header fields. Accesses to
        // the header emitted during macro expansion wouldn't have
        // correct memory state otherwise.
        _compile->get_alias_index(tinst->add_offset(oopDesc::mark_offset_in_bytes()));
!       _compile->get_alias_index(tinst->add_offset(Type::klass_offset()));
        if (alloc->is_Allocate() && (t->isa_instptr() || t->isa_aryptr())) {
          // Add a new NarrowMem projection for each existing NarrowMem projection with new adr type
          InitializeNode* init = alloc->as_Allocate()->initialization();
          assert(init != nullptr, "can't find Initialization node for this Allocate node");
          auto process_narrow_proj = [&](NarrowMemProjNode* proj) {
< prev index next >