RFR: 8230382: Clean up ConvI2L, CastII and CastLL::Ideal methods [v3]
Tobias Hartmann
thartmann at openjdk.java.net
Fri Feb 25 08:19:58 UTC 2022
On Thu, 24 Feb 2022 14:42:52 GMT, Emanuel Peter <duke at openjdk.java.net> wrote:
>> 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
Looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7609
More information about the hotspot-compiler-dev
mailing list