RFR: Cleanup code in C2 related to G1/Sh pre-barrier handling
Roman Kennke
rkennke at redhat.com
Thu Sep 13 15:22:44 UTC 2018
>> http://cr.openjdk.java.net/~rkennke/cleanup-c2-pre-barrier/webrev.00/
>
> There are things in there that should not be removed.
>
> The pre barriers for stores to non escaping allocation can be
> eliminated. To locate the pre barrier the call node has an extra edge to
> the address of the store. If the store is eliminated for some reason
> then we don't need to keep the address computation alive. That's what:
>
> CallLeafNode::Ideal()
> the code in Compile::remove_useless_nodes()
> the code in kill_dead_code()
> the code in PhaseIterGVN::remove_globally_dead_node()
> the code in Node::set_req_X()
>
> take care of. For kill_dead_code() and
> PhaseIterGVN::remove_globally_dead_node(), enqueue_useful_gc_barrier()
> could cover that.
>
> Also the code in macro.cpp is required for scalarization to work.
Ok, thanks for the explanations! Let's keep it more conservatively then:
- Move all the Shenandoah related property queries to ShenandoahBarrierSetC2
- Introduce BarrierSetC2::ideal_node() interface, as suggested by Erik
Österlund in the object-equals thread on hotspot-gc-dev and put it to
use in CallLeafNode::Ideal() to cover that
Leave everything else alone, except renaming. I also added a bunch of
TODOs in relevant places.
http://cr.openjdk.java.net/~rkennke/cleanup-c2-pre-barrier/webrev.00/
Better?
Roman
More information about the shenandoah-dev
mailing list