RFR: 8278114: New addnode ideal optimization: converting "x + x" into "x << 1" [v9]

Zhiqiang Zang duke at openjdk.java.net
Sun Dec 19 20:28:07 UTC 2021


> A new ideal optimization can be introduced for addnode: converting "x + x" into "x << 1".
> 
> 
> // Convert "x + x" into "x << 1"
> if (in1 == in2) {
>   return new LShiftINode(in1, phase->intcon(1));
> }

Zhiqiang Zang has updated the pull request incrementally with three additional commits since the last revision:

 - refactor the ir test.
 - rename tests.
 - use compiler mode blackhole in microbenchmark to prevent function calling from dominating time.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6675/files
  - new: https://git.openjdk.java.net/jdk/pull/6675/files/2bb824d6..306c95a3

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6675&range=08
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6675&range=07-08

  Stats: 499 lines in 4 files changed: 244 ins; 255 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6675.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6675/head:pull/6675

PR: https://git.openjdk.java.net/jdk/pull/6675


More information about the hotspot-compiler-dev mailing list