RFR: 8230382: Clean up ConvI2L, CastII and CastLL::Ideal methods [v3]

Emanuel Peter duke at openjdk.java.net
Thu Feb 24 14:42:52 UTC 2022


> This is a cleanup job: move code from `::Ideal` methods that only change types to `::Value` where the code belongs.
> 
> `CastLLNode::Ideal` was introduced in [JDK-8229496](https://bugs.openjdk.java.net/browse/JDK-8229496) and reverted (deleted) in [JDK-8242108](https://bugs.openjdk.java.net/browse/JDK-8242108).
> Currently, `CastLLNode` does not have its own `::Ideal` method. Hence, I changed nothing for it.
> 
> For `ConvI2LNode` and `CastIINode`, I went through a process of first copying the relevant code to `::Value`, calling it from `::Ideal` and asserting that they deliver equivalent results.
> These intermediate code results can be found in the comments of [JDK-8230382](https://bugs.openjdk.java.net/browse/JDK-8230382).
> I also tried to make the two code versions more similar, where they were unnecessarily different (used `can_reshape` instead of `igvn != NULL`, and removed the dead Overflow/wraparound case which can never happen).
> I ran tests: final code and intermediate code versions. Ensures code behaves equivalent and nothing broke.

Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:

  code style issues

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7609/files
  - new: https://git.openjdk.java.net/jdk/pull/7609/files/3a69f805..a79a95b0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7609&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7609&range=01-02

  Stats: 10 lines in 2 files changed: 6 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7609.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7609/head:pull/7609

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


More information about the hotspot-compiler-dev mailing list