RFR: 8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat [v6]
Theo Weidmann
tweidmann at openjdk.org
Fri Jan 17 08:18:21 UTC 2025
> 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();
Theo Weidmann has updated the pull request incrementally with five additional commits since the last revision:
- Update test/micro/org/openjdk/bench/vm/compiler/FluidSBBench.java
Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
- Update test/hotspot/jtreg/compiler/stringopts/TestFluidAndNonFluid.java
Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
- Update src/hotspot/share/opto/stringopts.hpp
Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
- Update src/hotspot/share/opto/stringopts.cpp
Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
- Update src/hotspot/share/opto/stringopts.cpp
Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22537/files
- new: https://git.openjdk.org/jdk/pull/22537/files/c82970fb..50a66954
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22537&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22537&range=04-05
Stats: 5 lines in 4 files changed: 0 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/22537.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22537/head:pull/22537
PR: https://git.openjdk.org/jdk/pull/22537
More information about the hotspot-compiler-dev
mailing list