RFR (M): 8143925: Enhancing CounterMode.crypt() for AES

John Rose john.r.rose at oracle.com
Wed Jan 6 19:50:22 UTC 2016


> On Jan 6, 2016, at 9:56 AM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
> 
> better canonicalization

That's our first and most important tactic.  (Actually inlining is.)

But the various idioms for checkIndex do not canonicalize easily. In this case the correct trade-off is not to invest more time and research and code into stronger canonicalization. 

We do have canonicalization of if-expressions. It's just that in this case strengthening it to cover range checks reliably is harder than the reasonable alternative.

– John

PS.  I am tempted to write out a list of 20 different ways to code a range check but will leave that as a exercise. 



More information about the hotspot-compiler-dev mailing list