RFR: ZGC: C2: Don't split loadbarriers past self referencing phi nodes

Nils Eliasson nils.eliasson at oracle.com
Mon May 7 08:36:27 UTC 2018


On 2018-05-04 17:37, Roland Westrelin wrote:
> Hi Nils,
>
>> I found a case when we are trying to split a loadbarrier past a phi
>> nodes which has one input that is itself. This is a workaround to just
>> skip those. Later we might want to try to remove these nodes earlier in
>> loop optimizations, but that is an upstream issue.
> I would have thought that PhiNode::Ideal() gets rid of them. AFAICT,
> that call would trigger that:
>
>    Node* uin = unique_input(phase, false);
>
> So I suppose the cycle is created by some other transformation during
> loop opts before the compiler has a chance to run a pass of IGVN?

At least one of the self loops I found was produced by PhiNode:ideal. I 
tried to reproduce it again this morning, but after syncing the repo I 
can't.

I suggest adding an assert to my patch, and if I find the problem again, 
I will add a proper fix to the origin of the self-looping phi.

Webrev: http://cr.openjdk.java.net/~neliasso/zgc/dont_split/webrev.02

Thanks for your valuable feedback,

// Nils


>
>> http://cr.openjdk.java.net/~neliasso/zgc/dont_split/webrev.01/
> Looks ok to me.
>
> Roland.



More information about the zgc-dev mailing list