RFR: 8341696: C2: Non-fluid StringBuilder pattern bails out in OptoStringConcat [v8]
Theo Weidmann
tweidmann at openjdk.org
Tue Jan 21 09:31:26 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 18 additional commits since the last revision:
- Merge branch 'master' into non-fluid-stringopt
- Cosmetic improvements
- 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>
- Make code more clear
- Fix test name
- Move test
- ... and 8 more: https://git.openjdk.org/jdk/compare/4e6fe253...a2c3b727
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22537/files
- new: https://git.openjdk.org/jdk/pull/22537/files/db1df5d0..a2c3b727
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22537&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22537&range=06-07
Stats: 238960 lines in 5511 files changed: 137013 ins; 83598 del; 18349 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