RFR: 8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat [v3]
Tobias Hartmann
thartmann at openjdk.org
Wed Dec 11 06:55:36 UTC 2024
On Wed, 4 Dec 2024 09:15:37 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 one additional commit since the last revision:
>
> Move test
Please make sure to run testing with javac flag `-XDstringConcat` to have it use StringBuffer instead of invokedynamic based string concat (see [JEP 280](https://openjdk.org/jeps/280)).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22537#issuecomment-2533778142
More information about the hotspot-compiler-dev
mailing list