SFX and address cloning problem
Roland Westrelin
rwestrel at redhat.com
Fri Jul 5 12:04:43 UTC 2019
> So, I tried to clone it:
>
> diff -r 6fa068615a94 src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
> --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Wed Jul 03 17:19:16 2019 +0200
> +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Fri Jul 05 11:51:13 2019 +0200
> @@ -1530,6 +1530,12 @@
> } else {
> addr = phase->igvn().zerocon(T_OBJECT);
> }
> + if (addr->Opcode() == Op_AddP) {
> + addr = addr->clone();
> + addr->set_req(0, ctrl); // Critical? Bad generated code without it...
> + phase->register_new_node(addr, ctrl);
> + }
> +
> call_lrb_stub(ctrl, fwd, addr, result_mem, raw_mem, phase);
> region->init_req(_evac_path, ctrl);
> val_phi->init_req(_evac_path, fwd);
>
I don't think setting the control on the the AddPNode can be made to
work. There are several solutin to this:
One is to not push the cloned AddP on the IGVN worklist: call
phase->igvn()._worklist.yank(addr) after register_new_node(). That one
is not 100% robust to work as the node could be transformed later as a
side effect of something else.
Clone the addr and change the base input so it's a CheckCastPPNode of
the previous base input to the current type of the base input but with
carry_dependency set. Set the control of the CheckCastPPNode.
Do the cloning at graph final reshaping time. There's nothing that
should common identical nodes then.
Do the cloning as part of matching by changing
Matcher::clone_address_expressions().
Roland.
More information about the shenandoah-dev
mailing list