< prev index next >

src/hotspot/share/opto/callnode.cpp

Print this page
*** 1675,15 ***
    }
  }
  Node *AllocateNode::make_ideal_mark(PhaseGVN *phase, Node* obj, Node* control, Node* mem) {
    Node* mark_node = nullptr;
    // For now only enable fast locking for non-array types
!   if (UseBiasedLocking && Opcode() == Op_Allocate) {
      Node* klass_node = in(AllocateNode::KlassNode);
      Node* proto_adr = phase->transform(new AddPNode(klass_node, klass_node, phase->MakeConX(in_bytes(Klass::prototype_header_offset()))));
      mark_node = LoadNode::make(*phase, control, mem, proto_adr, TypeRawPtr::BOTTOM, TypeX_X, TypeX_X->basic_type(), MemNode::unordered);
    } else {
      mark_node = phase->MakeConX(markWord::prototype().value());
    }
    return mark_node;
  }
  
--- 1675,16 ---
    }
  }
  Node *AllocateNode::make_ideal_mark(PhaseGVN *phase, Node* obj, Node* control, Node* mem) {
    Node* mark_node = nullptr;
    // For now only enable fast locking for non-array types
!   if ((UseBiasedLocking && Opcode() == Op_Allocate) || UseCompactObjectHeaders) {
      Node* klass_node = in(AllocateNode::KlassNode);
      Node* proto_adr = phase->transform(new AddPNode(klass_node, klass_node, phase->MakeConX(in_bytes(Klass::prototype_header_offset()))));
      mark_node = LoadNode::make(*phase, control, mem, proto_adr, TypeRawPtr::BOTTOM, TypeX_X, TypeX_X->basic_type(), MemNode::unordered);
    } else {
+     // For now only enable fast locking for non-array types
      mark_node = phase->MakeConX(markWord::prototype().value());
    }
    return mark_node;
  }
  
< prev index next >