RFR(M): 8137168: Replace IfNode with a new RangeCheckNode for range checks

Roland Westrelin roland.westrelin at oracle.com
Wed Oct 14 08:14:34 UTC 2015


Thanks for the review, Vladimir.

Can I get another review for this?

Roland.

> On Sep 26, 2015, at 4:45 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> 
> Looks fine to me.
> 
> Thanks,
> Vladimir
> 
> On 9/25/15 11:04 PM, Roland Westrelin wrote:
>> This code adds a new ideal node, RangeCheckNode that is inserted during parsing when a range check is emitted. The entire change is code refactoring to accommodate the new node. This is preparation work for 8042997 and 8135248.
>> 
>> 8135248 will add a new method to java.util.Arrays:
>> 
>> int checkIndex(int index, int length,
>>                OutOfBoundsToException<T> oobe) throws T, IndexOutOfBoundsException {
>>     if (index < 0 || index >= length)
>>         throw outOfBounds(index, length, length, oobe);
>>     return index;
>> }
>> 
>> 8042997 will intrinsify that method and translate it into a CmpU + RangeCheckNode.
>> 
>> The benefit of the RangeCheckNode is that it will help the compiler locate range checks to optimize even if they don’t strictly follow the pattern of a range check: CmpU + IfNode + LoadRange. The idea of using a node specifically for range checks is from John.
>> 
>> http://cr.openjdk.java.net/~roland/8137168/webrev.00/
>> 
>> Roland.
>> 



More information about the hotspot-compiler-dev mailing list