< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp

Print this page

 938     mem_phi->init_req(_heap_stable, mem);
 939 
 940     // Heap is unstable, call into clone barrier stub
 941     Node* call = phase->make_leaf_call(unstable_ctrl, mem,
 942                                        ShenandoahBarrierSetC2::clone_barrier_Type(),
 943                                        CAST_FROM_FN_PTR(address, ShenandoahRuntime::clone_barrier),
 944                                        "shenandoah_clone",
 945                                        TypeRawPtr::BOTTOM,
 946                                        src_base);
 947     call = phase->transform_later(call);
 948 
 949     ctrl = phase->transform_later(new ProjNode(call, TypeFunc::Control));
 950     mem = phase->transform_later(new ProjNode(call, TypeFunc::Memory));
 951     region->init_req(_heap_unstable, ctrl);
 952     mem_phi->init_req(_heap_unstable, mem);
 953 
 954     // Wire up the actual arraycopy stub now
 955     ctrl = phase->transform_later(region);
 956     mem = phase->transform_later(mem_phi);
 957 









 958     const char* name = "arraycopy";
 959     call = phase->make_leaf_call(ctrl, mem,
 960                                  OptoRuntime::fast_arraycopy_Type(),
 961                                  phase->basictype2arraycopy(T_LONG, nullptr, nullptr, true, name, true),
 962                                  name, TypeRawPtr::BOTTOM,
 963                                  src, dest, length
 964                                  LP64_ONLY(COMMA phase->top()));
 965     call = phase->transform_later(call);
 966 
 967     // Hook up the whole thing into the graph
 968     phase->igvn().replace_node(ac, call);
 969   } else {
 970     BarrierSetC2::clone_at_expansion(phase, ac);
 971   }
 972 }
 973 
 974 
 975 // Support for macro expanded GC barriers
 976 void ShenandoahBarrierSetC2::register_potential_barrier_node(Node* node) const {
 977   if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {

 938     mem_phi->init_req(_heap_stable, mem);
 939 
 940     // Heap is unstable, call into clone barrier stub
 941     Node* call = phase->make_leaf_call(unstable_ctrl, mem,
 942                                        ShenandoahBarrierSetC2::clone_barrier_Type(),
 943                                        CAST_FROM_FN_PTR(address, ShenandoahRuntime::clone_barrier),
 944                                        "shenandoah_clone",
 945                                        TypeRawPtr::BOTTOM,
 946                                        src_base);
 947     call = phase->transform_later(call);
 948 
 949     ctrl = phase->transform_later(new ProjNode(call, TypeFunc::Control));
 950     mem = phase->transform_later(new ProjNode(call, TypeFunc::Memory));
 951     region->init_req(_heap_unstable, ctrl);
 952     mem_phi->init_req(_heap_unstable, mem);
 953 
 954     // Wire up the actual arraycopy stub now
 955     ctrl = phase->transform_later(region);
 956     mem = phase->transform_later(mem_phi);
 957 
 958     if (should_copy_int_prefix(phase, ac)) {
 959       mem = arraycopy_copy_int_prefix(phase, ctrl, mem, src, dest);
 960 
 961       // We've copied the prefix, bump the pointers.
 962       src = phase->basic_plus_adr(src_base, src, BytesPerInt);
 963       dest = phase->basic_plus_adr(dest_base, dest, BytesPerInt);
 964     }
 965 
 966     // Bulk copy.
 967     const char* name = "arraycopy";
 968     call = phase->make_leaf_call(ctrl, mem,
 969                                  OptoRuntime::fast_arraycopy_Type(),
 970                                  phase->basictype2arraycopy(T_LONG, nullptr, nullptr, true, name, true),
 971                                  name, TypeRawPtr::BOTTOM,
 972                                  src, dest, length
 973                                  LP64_ONLY(COMMA phase->top()));
 974     call = phase->transform_later(call);
 975 
 976     // Hook up the whole thing into the graph
 977     phase->igvn().replace_node(ac, call);
 978   } else {
 979     BarrierSetC2::clone_at_expansion(phase, ac);
 980   }
 981 }
 982 
 983 
 984 // Support for macro expanded GC barriers
 985 void ShenandoahBarrierSetC2::register_potential_barrier_node(Node* node) const {
 986   if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
< prev index next >