RFR: 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well [v3]

Vladimir Ivanov vlivanov at openjdk.java.net
Fri Dec 4 12:16:13 UTC 2020


On Mon, 23 Nov 2020 09:40:18 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> This was reported by Paul with the vector API. There are 2 issues:
>> 
>> - CastII nodes (added by Objects.checkIndex()) gets in the way of the
>>   pattern matching performed by range check elimination
>> 
>> - By transforming (CastII (AddI x y)) into (AddI (CastII x) (CastII y))
>>   some CastII can be eliminated which improves address computation code.
>
> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   CastII pushed thru chain of AddIs

Looks good.

src/hotspot/share/opto/convertnode.cpp line 33:

> 31: #include "opto/subnode.hpp"
> 32: #include "runtime/sharedRuntime.hpp"
> 33: #include "compile.hpp"

Redundant or `opto/compile.hpp`?

-------------

Marked as reviewed by vlivanov (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1342


More information about the hotspot-compiler-dev mailing list