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

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Oct 27 15:30:11 UTC 2015


I see. So the only pattern we are looking for is where 'throw' is 
replaced with unstable_if uncommon trap.

Okay then.

Thanks,
Vladimir

On 10/27/15 11:09 PM, Roland Westrelin wrote:
>> 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