RFR: JDK-8213381: Hook to allow GC to inject Node::Ideal() calls

Erik Österlund erik.osterlund at oracle.com
Tue Nov 6 16:17:13 UTC 2018


Hi Roman,

Looks good.

Thanks,
/Erik

On 2018-11-06 14:28, Roman Kennke wrote:
> It now appears to me that for sake of consistency, we shall probably
> provide a similar hook for Identity() (and we might actually have a use
> for this in Shenandoah too). This is a bit more involved, because
> Identity() seems to be called from a few places around the code. I made
> the two PhaseGVN::apply_ideal(..) and PhaseGVN::apply_identity(..)
> methods public for this reason. Other than that, same concept as
> previous patch:
>
> Incremental:
> http://cr.openjdk.java.net/~rkennke/JDK-8213381/webrev.01.diff/
> Full:
> http://cr.openjdk.java.net/~rkennke/JDK-8213381/webrev.01/
>
> Thoughts?
>
> Roman
>
>> Shenandoah injects a couple of reshapings into some implementations of
>> Node::Ideal() (namely CallLeafNode::Ideal() and CmpPNode::Ideal()). I
>> propose to provide a hook into BarrierSetC2 to better abstract this.
>> This might be useful for other GCs too.
>>
>> The approach that I've chosen here is to call BSC2::ideal_node(..) from
>> the places in phaseX.cpp where we also call Node::Ideal(..). I've
>> introduced a helper method to do this: first call BSC2::ideal_node(..),
>> if that returns NULL, call into the usual Node::Ideal(..).
>>
>> BarrierSetC2::ideal_node(..) must follow the same contract as
>> Node::Ideal(..) of course.
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8213381
>> Webrev:
>> http://cr.openjdk.java.net/~rkennke/JDK-8213381/webrev.00/
>>
>> Testing: hotspot/jtreg:tier1 passes locally.
>>
>> Can I please get reviews?
>>
>> Roman
>>



More information about the hotspot-gc-dev mailing list