RFR: 8303951: Add asserts before record_method_not_compilable where possible

Emanuel Peter epeter at openjdk.org
Fri Mar 17 08:38:20 UTC 2023


I went through all `C2` bailouts, and checked if they are justified to bail out of compilation silently. I added asserts everywhere. Those that were hit, I inspected by hand.

Some of them seem to be justified. There I added comments why they are justified. They are cases that we do not want to handle in `C2`, and that are rare enough so that it probably does not matter.

For the following bailouts I did not add an assert, because it may have revealed a bug:
[JDK-8304328](https://bugs.openjdk.org/browse/JDK-8304328) C2 Bailout "failed spill-split-recycle sanity check" reveals hidden issue with RA

Note:
[JDK-8303466](https://bugs.openjdk.org/browse/JDK-8303466) C2: COMPILE SKIPPED: malformed control flow - only one IfProj
That bug bug was the reason for this RFE here. I added the assert for "malformed control flow". After this RFE here, that Bug will run into the assert on debug builds.

I ran `tier1-6` and stress testing. None of the asserts triggered.

Should we file a follow-up RFE to do the same for `BAILOUT` in `C1`?

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

Commit messages:
 - Merge branch 'master' into JDK-8303951
 - Out of stack space - expected bailout
 - moving spill-split-recycle bailout to future work
 - manual merge after NULL nullptr
 - 8303951: Add asserts before record_method_not_compilable where possible

Changes: https://git.openjdk.org/jdk/pull/13038/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13038&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303951
  Stats: 46 lines in 10 files changed: 42 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/13038.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/13038/head:pull/13038

PR: https://git.openjdk.org/jdk/pull/13038


More information about the hotspot-compiler-dev mailing list