src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
changeset 58273 08a5148e7c4e
parent 57904 4f38fcd65577
child 58516 d376d86b0a01
equal deleted inserted replaced
58272:e27564cd10e3 58273:08a5148e7c4e
   658 
   658 
   659   return c;
   659   return c;
   660 }
   660 }
   661 
   661 
   662 bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const {
   662 bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const {
   663   return type == T_OBJECT || type == T_ARRAY;
   663   return is_reference_type(type);
   664 }
   664 }
   665 
   665 
   666 bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const {
   666 bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const {
   667   switch (opcode) {
   667   switch (opcode) {
   668     case Op_LoadBarrier:
   668     case Op_LoadBarrier:
  1365     if (is_old_node) {
  1365     if (is_old_node) {
  1366       if (n->is_LoadStore()) {
  1366       if (n->is_LoadStore()) {
  1367         LoadStoreNode* lsn = n->as_LoadStore();
  1367         LoadStoreNode* lsn = n->as_LoadStore();
  1368         if (lsn->has_barrier()) {
  1368         if (lsn->has_barrier()) {
  1369           BasicType bt = lsn->in(MemNode::Address)->bottom_type()->basic_type();
  1369           BasicType bt = lsn->in(MemNode::Address)->bottom_type()->basic_type();
  1370           assert ((bt == T_OBJECT || bt == T_ARRAY), "Sanity test");
  1370           assert (is_reference_type(bt), "Sanity test");
  1371           insert_barrier_before_unsafe(phase, lsn);
  1371           insert_barrier_before_unsafe(phase, lsn);
  1372         }
  1372         }
  1373       }
  1373       }
  1374     }
  1374     }
  1375     for (uint i = 0; i < n->len(); i++) {
  1375     for (uint i = 0; i < n->len(); i++) {