RFR: 8255672: Replace PhaseTransform::eqv by pointer equality check
Christian Hagedorn
chagedorn at openjdk.java.net
Mon Nov 2 10:05:57 UTC 2020
On Mon, 2 Nov 2020 09:29:40 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> `PhaseTransform::eqv(n1, n2)` can be replaced by `n1 == n2`. Code in adlc also refers to it but already uses `==` instead.
>
> Thanks,
> Tobias
Looks good to me!
src/hotspot/share/opto/subnode.cpp line 458:
> 456: // Convert "x - (x+y)" into "-y"
> 457: return new SubFNode(phase->makecon(TypeF::ZERO),in(2)->in(2));
> 458: }
Missing space before `in(2)->in(2)`.
src/hotspot/share/opto/movenode.cpp line 129:
> 127: if (phase->type(in(Condition)) == TypeInt::ZERO) {
> 128: return in(IfFalse); // Always pick left(false) input
> 129: }
Could be merged with the `if` above but might be clearer if left as it is now.
src/hotspot/share/opto/divnode.cpp line 1174:
> 1172: if (in(1) == in(2)) {
> 1173: return TypeLong::ZERO;
> 1174: }
Could be merged with the `if` above.
src/hotspot/share/opto/divnode.cpp line 999:
> 997: if (in(1) == in(2)) {
> 998: return TypeInt::ZERO;
> 999: }
Could be merged with the `if` above.
src/hotspot/share/opto/callnode.cpp line 1232:
> 1230: if (in(0) == this) {
> 1231: return Type::TOP; // Dead infinite loop
> 1232: }
Could be merged with the `if` above but might be clearer if left as it is now.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/999
More information about the hotspot-compiler-dev
mailing list