RFR: 8328865: [c2] No need to convert "(x+1)+y" into "(x+y)+1" when y is a CallNode [v2]
SUN Guoyun
duke at openjdk.org
Wed Mar 27 08:45:55 UTC 2024
> This patch prohibits the conversion from "(x+1)+y" into "(x+y)+1" when y is a CallNode to reduce unnecessary spillcode and ADDNode.
>
> Testing: tier1-3 in x86_64 and LoongArch64
>
> JMH in x86_64:
> <pre>
> before:
> Benchmark Mode Cnt Score Error Units
> CallNode.test thrpt 2 26397.733 ops/s
>
> after:
> Benchmark Mode Cnt Score Error Units
> CallNode.test thrpt 2 27839.337 ops/s
> </pre>
SUN Guoyun 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 two additional commits since the last revision:
- 8328865: [c2] No need to convert "(x+1)+y" into "(x+y)+1" when y is a CallNode
- 8328865: [c2] No need to convert "(x+1)+y" into "(x+y)+1" when y is a CallNode
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18482/files
- new: https://git.openjdk.org/jdk/pull/18482/files/14dc5dee..269cd945
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18482&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18482&range=00-01
Stats: 1440 lines in 48 files changed: 457 ins; 735 del; 248 mod
Patch: https://git.openjdk.org/jdk/pull/18482.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18482/head:pull/18482
PR: https://git.openjdk.org/jdk/pull/18482
More information about the hotspot-compiler-dev
mailing list