RFR: 8332032: C2: Remove ExpandSubTypeCheckAtParseTime flag

Christian Hagedorn chagedorn at openjdk.org
Wed May 29 11:12:30 UTC 2024


With this patch I propose to remove the diagnostic product flag `ExpandSubTypeCheckAtParseTime` for the following reasons:
- Expanding sub type checks eagerly during parse time has a maintenance cost. We've had to make special fixes due to skipping `SubTypeCheckNodes` in the past (recent example: [JDK-8328702](https://bugs.openjdk.org/browse/JDK-8328702), where the idea of removing this flag was first discussed).
- This stress option has not helped much to find bugs. Going through JBS, maybe only 1 or 2 bugs can be attributed to this flag over the last 4 years - and even for those, it could have very well be that the flag was not required because it was often accompanied by other stress flags such as `StressReflecitiveCode`.
- We currently have a bug in Valhalla ([JDK-8331912](https://bugs.openjdk.org/browse/JDK-8331912)) which only happens with `ExpandSubTYpeCheckAtParseTime`. The reason is that we lose flatness information due to the eager sub type expansion. Later, data becomes top and the corresponding (already expanded) sub type check fails to fold control as well, leading to a broken graph. The simplest solution is to remove `ExpandSubTYpeCheckAtParseTime`.

Thanks,
Christian

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

Commit messages:
 - 8332032: C2: Remove ExpandSubTypeCheckAtParseTime flag

Changes: https://git.openjdk.org/jdk/pull/19430/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19430&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8332032
  Stats: 18 lines in 4 files changed: 1 ins; 13 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/19430.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19430/head:pull/19430

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


More information about the hotspot-compiler-dev mailing list