< prev index next >

src/hotspot/share/opto/escape.cpp

Print this page
*** 3427,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 {
--- 3427,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 {

*** 4426,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())) {
  
          // First, put on the worklist all Field edges from Connection Graph
          // which is more accurate than putting immediate users from Ideal Graph.
          for (EdgeIterator e(ptn); e.has_next(); e.next()) {
--- 4426,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())) {
  
          // First, put on the worklist all Field edges from Connection Graph
          // which is more accurate than putting immediate users from Ideal Graph.
          for (EdgeIterator e(ptn); e.has_next(); e.next()) {
< prev index next >