8238691: C2: turn subtype check into macro node
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Feb 14 07:53:29 UTC 2020
Hi Roland,
On 13.02.20 17:45, Roland Westrelin wrote:
> http://cr.openjdk.java.net/~roland/8238691/webrev.02/
Thanks for making these changes, looks good!
>> 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.
Right.
>> - 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 was suggesting this because I incorrectly assumed that the nodes are always dead - which is not
the case. Your version is better then but you might want to use PhaseGVN::record_for_igvn to avoid
the is_IterGVN() check (no new webrev required).
Thanks,
Tobias
More information about the hotspot-compiler-dev
mailing list