[9] RFR(S): 8140574: C2 must re-execute checks after deoptimizing from merged uncommon traps

Roland Westrelin roland.westrelin at oracle.com
Tue Oct 27 15:09:07 UTC 2015


> Should we just additionally check re-execute flag?
> 
> dom_unc->jvms()->should_reexecute()
> 
> Unfortunately wee can't change reexecute flag since JVM state is already recorded according to it.
> 
> Roland, what do you think?

Is checking for should_reexecute() sufficient? Couldn’t we reexecute some bytecode in one branch that caused the branch to become dead but not the if itself?

This change was put in so we optimize the pattern:

if (i < 0 || i >= length) { throw… }

of explicit array bound checks. Restricting it to unstable_if uncommon traps, doesn’t break that scenario so I would say that fix is good enough and feels safe.

Roland.



More information about the hotspot-compiler-dev mailing list