RFR: Use CallNode for clone-barrier

Roman Kennke rkennke at redhat.com
Fri Nov 16 18:14:01 UTC 2018


While looking around the code that calls shenandoah runtime barriers, I
noticed a little discrepancy. In one place we have:

bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const {
  if (node->Opcode() != Op_CallLeaf) {
    return false;
...
  return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
..
}

But we do generate the clone barrier with CallLeafNoFP. The above can
never match. Also, since Roland's work and what's happening upstream,
CallLeaf and CallLeafNoFP is basically the same, and we find that it is
not safe to assume runtime doesn't touch FP registers, especially when
bulk copying is involved (which is the case for clone barrier). Let's
change it like this:

diff --git
a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
@@ -964,9 +964,9 @@

   Node* dest = ac->in(ArrayCopyNode::Dest);
   assert(dest->is_AddP(), "bad input");
-  Node* barrier_call = new
CallLeafNoFPNode(ShenandoahBarrierSetC2::shenandoah_clone_barrier_Type(),
-                                            CAST_FROM_FN_PTR(address,
ShenandoahRuntime::shenandoah_clone_barrier),
-                                            "shenandoah_clone_barrier",
raw_adr_type);
+  Node* barrier_call = new
CallLeafNode(ShenandoahBarrierSetC2::shenandoah_clone_barrier_Type(),
+                                        CAST_FROM_FN_PTR(address,
ShenandoahRuntime::shenandoah_clone_barrier),
+                                        "shenandoah_clone_barrier",
raw_adr_type);
   barrier_call->init_req(TypeFunc::Control, c);
   barrier_call->init_req(TypeFunc::I_O    , igvn.C->top());
   barrier_call->init_req(TypeFunc::Memory , m);


Testing: tier3_gc_shenandoah ok

Ok?

Roman



More information about the shenandoah-dev mailing list