RFR: 8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat [v2]

theoweidmannoracle duke at openjdk.org
Wed Dec 4 08:37:38 UTC 2024


On Wed, 4 Dec 2024 08:34:00 GMT, theoweidmannoracle <duke at openjdk.org> wrote:

>> Extends stringopts to also recognize non-fluid uses of StringBuilder and optimize them the same way.
>> 
>> For example, this basic case was not optimized before and is optimized with this PR:
>> 
>> 
>> StringBuilder sb = new StringBuilder();
>> sb.append("a");
>> sb.append(a);
>> return sb.toString();
>
> theoweidmannoracle has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Correct copyright
>  - Ensure new line
>  - Add copyright

test/micro/org/openjdk/bench/vm/compiler/FluidSBBench.java line 2:

> 1: /*
> 2:  * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.

@shipilev I copied this benchmark from your RFE. Is this copyright notice correct?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22537#discussion_r1868960616


More information about the hotspot-compiler-dev mailing list