RFR(M): 8223051: support loops with long (64b) trip counts

Roland Westrelin rwestrel at redhat.com
Mon Aug 17 08:49:28 UTC 2020


John, Tobias,

> The last patch is flawed: predicates in the inner loop use the jvm state
> from the predicates of the initial loop, that is the state before the
> loop. If deoptimization happens for an inner loop predicate on an
> iteration of the outer loop that's not the first one then execution
> resumes as if the initial loop was never executed when it's already part
> way through.
>
> To fix this, I changed the code so one iteration of the loop is peeled
> when the loop is transformed to a long counted loop. State for
> predicates is obtained from the safepoint at the end of the peeled
> iteration of the loop.

Does the fixed patch look ok to you?

Roland.

> http://cr.openjdk.java.net/~roland/8223051/webrev.03/
>
> diff from previous patch:
> http://cr.openjdk.java.net/~roland/8223051/webrev.02-03/



More information about the hotspot-compiler-dev mailing list