Integrated: 8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat

Theo Weidmann tweidmann at openjdk.org
Thu Jan 23 08:43:55 UTC 2025


On Wed, 4 Dec 2024 08:20:24 GMT, Theo Weidmann <tweidmann 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();

This pull request has now been integrated.

Changeset: 6032f6ea
Author:    Theo Weidmann <tweidmann at openjdk.org>
Committer: Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6032f6ea04a5f0d52e0a375df764cb15273c8836
Stats:     358 lines in 4 files changed: 291 ins; 43 del; 24 mod

8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat

Reviewed-by: epeter

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

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


More information about the hotspot-compiler-dev mailing list