RFR: 8143900: OptimizeStringConcat has an opaque dependency on Integer.sizeTable field [v2]

Vladimir Kozlov kvn at openjdk.org
Sat Feb 25 01:37:19 UTC 2023


On Fri, 24 Feb 2023 10:19:49 GMT, Yi Yang <yyang at openjdk.org> wrote:

>> Hi, can I have a review for this patch? I noticed a strange field Integer.sizeTable which is used by PhaseStringOpts, after digging into the history, I think it could be replaced by an in-place array allocation and initialization. Before it, we are fetching from Integer.sizeTable and get num of digit in integer by iterating size table, now we fetch from in-place sizeTable and get size from that. The changed IR looks like this:
>> 
>> ![image](https://user-images.githubusercontent.com/5010047/220239446-7b8b8381-b300-4f2c-a24a-aa19ec9e2f88.png)
>> 
>> Thanks.
>
> Yi Yang has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - whitespace
>  - mirror or Integer.stringSize
>  - mirror or Integer.stringSize

Testing results seem good. Except one strange failure I put in [JDK-8143900](https://bugs.openjdk.org/browse/JDK-8143900) comment.
You need second review.

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

PR: https://git.openjdk.org/jdk/pull/12680


More information about the hotspot-compiler-dev mailing list