[jdk17] RFR: 8268884: C2: Compile::remove_speculative_types must iterate top-down

Nils Eliasson neliasso at openjdk.java.net
Tue Jun 29 16:11:25 UTC 2021


On Tue, 29 Jun 2021 11:12:52 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>>> Hi Nils,
>>> Compile::remove_speculative_types() removes speculative types before CCP. How come this node still has a speculative type?
>> 
>> Compile::remove_speculative_types() traverses the graph bottom up. The checkcast is part of an infinite loop with no exit edge. It can't be reached from below.
>
>> > Hi Nils,
>> > Compile::remove_speculative_types() removes speculative types before CCP. How come this node still has a speculative type?
>> 
>> Compile::remove_speculative_types() traverses the graph bottom up. The checkcast is part of an infinite loop with no exit edge. It can't be reached from below.
> 
> Wouldn't it make sense then to improve Compile::remove_speculative_types() so we're guaranteed it removes all of them?

Thanks for the review @rwestrel and @vnkozlov 

I have added a comments and updated the bug title to reflect the solution.

-------------

PR: https://git.openjdk.java.net/jdk17/pull/170


More information about the hotspot-compiler-dev mailing list