Add some missing UseShenandoahGC checks to 8u

Aleksey Shipilev shade at redhat.com
Thu Sep 21 12:59:03 UTC 2017


On 09/21/2017 02:52 PM, Roland Westrelin wrote:
>> *) loopnode.cpp does not look right. With !UseShenandoahGC this predicate is always false?
>>
>>   3608       if (new_ctrl != least) {
> 
> upstream code for this is:
> 
>     if (ctrl_out && ctrl_out->is_CountedLoop() &&
>         least == ctrl_out->in(LoopNode::EntryControl)) {
>       Node* least_dom = idom(least);
>       if (get_loop(least_dom)->is_member(get_loop(least))) {
>         least = least_dom;
>       }
>     }
> 
> so to stick to upstream behaviour we only want the else line 3610 to
> have a chance to succeed.

I see! I wonder if it's cleaner/safer to revert to upstream and conditionalize the entire block on
UseShenandoahGC then, to make it obvious the upstream code stays the same, instead of trying to play
games with locals... I.e. so that the original upstream code was the same "if" branch:

https://builds.shipilev.net/patch-openjdk-shenandoah-jdk8/2017-09-19-v38-vs-20d83f8419c4/src/share/vm/opto/loopnode.cpp.sdiff.html


-Aleksey



More information about the shenandoah-dev mailing list