RFR (L): 7153771: array bound check elimination for c1

Roland Westrelin roland.westrelin at oracle.com
Tue Apr 17 05:37:22 PDT 2012


> While speaking of it - how expensive is this opt?

I haven't done any measurements myself (just sanity checked the compilation speed) but the paper I link to in the RFR has a performance evaluation section.

> Will it be available for c1 in tiered?

The optimization operates in 2 modes. The basic optimization removes bound checks that it can prove unnecessary. "Optimistic" optimizations can also be performed (optimizations that may require a deoptimization in exceptional cases): an invariant code motion pass comes with this change (if the code that is moved trigger an exception then a deoptimization is required), bound checks in a loop may be replaced with predicates inserted before the loop, or a series of accesses to the same array in a block for which the bound checks may be replaced by a predicate inserted before the accesses (in both cases, if the predicate fails then we deoptimize).
In tiered, the code that I sent for review has bound check elimination but it doesn't do any of the optimistic stuff.

> And may that have a negative impact since we are producing a lot of code. (I know tiered is on hold for u4, but this will have to be address sometime anyway.)

The extra cost of this optimization looks very reasonable to me so I wouldn't worry but someone else may have comments on how c1 compilation speed affects tiered performance.

> In general - are we running the same opts in c1 and c1/tiered, or just a subset?

tiered doesn't have conditional exception elimination and block elimination.

Roland.


More information about the hotspot-compiler-dev mailing list