RFR: 8319793: C2 compilation fails with "Bad graph detected in build_loop_late" after JDK-8279888 [v9]

Roland Westrelin roland at openjdk.org
Fri Jan 5 10:03:32 UTC 2024


On Fri, 5 Jan 2024 08:49:12 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
>> 
>>  - Merge branch 'master' into JDK-8319793
>>  - review
>>  - Revert "Update src/hotspot/share/opto/castnode.hpp"
>>    
>>    This reverts commit 356c91cca911ed486f9f87f3eff53ce21e1e3ec9.
>>  - Revert "Update src/hotspot/share/opto/memnode.hpp"
>>    
>>    This reverts commit bdb731ea562f314f44d327f7243ef5cf9ad40b2e.
>>  - review
>>  - Update src/hotspot/share/opto/memnode.hpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update src/hotspot/share/opto/castnode.hpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update src/hotspot/share/opto/castnode.cpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update src/hotspot/share/opto/ifnode.cpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Merge branch 'master' into JDK-8319793
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/15519285...dbe3c4c1
>
> src/hotspot/share/opto/loopopts.cpp line 345:
> 
>> 343: 
>> 344:   if (dp == nullptr)
>> 345:     return;
> 
> Since we bail out above if `iff->outcnt() != 2` (can it even be that we have an `If` at this point which does not have 2 out projections?) this bailout seems redundant. Looks like it was only added due to a parfait report with https://github.com/openjdk/jdk/commit/25c4a7fccdbdaa9da0a7aa5e04e80966138fe42c. Maybe we can remove that as well and change `proj_out_or_null()` back to  `proj_out()` (not sure though if parfait will then report this again). But could also be done separately.

Thanks for the details. Why would it have it been necessary before but no longer necessary now? What is it that has changed so parfait would not complain?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16886#discussion_r1442690872


More information about the hotspot-compiler-dev mailing list