8238691: C2: turn subtype check into macro node

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Feb 13 17:01:00 UTC 2020


>> Here are some minor (style) comments:
>> - I don't like that find_bottom_mem code but I guess there's no way to avoid it. Please add at least
>> a comment because without your explanation in the RFR it's not obvious why it's needed.
> 
> I don't like it either but alternatives are not appealing: use immutable
> memory when the field is mutable or carry memory as input to the macro
> node which would get in the way of optimizations or build complicated
> machinery to connect memory edges accurately at macro expansion time
> that would make no functional difference.

IMO in this particular case it's ok to use immutable memory and give up 
on possible optimizations.

>> - In SubTypeCheckNode::Ideal, why are you adding these temporary nodes to the worklist instead of
>> just calling remove_dead_node? Also, shouldn't you do these before the return in line 143 as well?
> 
> I usually go with pushing the node on the worklist and you usually ask
> me to change it to calling remove_dead_node. I don't have a strong
> preference so I changed it but I'm not sure I see why one is better than
> another.
> 
>>> I verified that it fixes JDK-8220708 [1].
>>
>> Can we close JDK-8220708 as duplicate then?
> 
> A question for Vladimir?

I already closed JDK-8222075 as a duplicate. JDK-8220708 is there to 
track the problem in 11u [1].

Best regards,
Vladimir Ivanov


[1] 
https://bugs.openjdk.java.net/browse/JDK-8220708?focusedCommentId=14256113&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14256113


More information about the hotspot-compiler-dev mailing list