[jdk20] RFR: 8298176: remove OpaqueZeroTripGuardPostLoop once main-loop disappears [v2]

Roland Westrelin roland at openjdk.org
Thu Dec 15 13:21:07 UTC 2022


On Thu, 15 Dec 2022 13:06:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> For JDK21 I will also file an RFE to try removing the `OpaqueZeroTripGuardPostLoop` completely (never even insert it).

FWIW, I don't think it's the right way to proceed. Having `OpaqueZeroTripGuardPostLoop` guarantees the zero trip guard for the post loop doesn't go away while we're not done with that loop. It's quite possible the zero trip guard without `OpaqueZeroTripGuardPostLoop` can't fold away either because C2 in its current state can't prove anything about it or because other opaque nodes hide enough type information. It's also possible it can fold away but current testing won't catch it. All sort of questions we don't have to think about as long as `OpaqueZeroTripGuardPostLoop`  is here: having `OpaqueZeroTripGuardPostLoop` makes reasoning about the loops easier at the very least. That seems like a precious thing that we would give up only because there's a corner case that's bothering us today.

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

PR: https://git.openjdk.org/jdk20/pull/22


More information about the hotspot-compiler-dev mailing list