RFR: 8254269: simplify Node::disconnect_inputs [v2]
Vladimir Kozlov
kvn at openjdk.java.net
Sun Oct 11 20:10:09 UTC 2020
On Sun, 11 Oct 2020 08:08:18 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> 8254269: simplify Node::disconnect_inputs
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>
> 8254269: simplify Node::disconnect_inputs
>
> Optimize it for the precedence loop. because there's no null between
> 2 non-null precedences, disconnect_inputs can break at a null value.
Changes requested by kvn (Reviewer).
src/hotspot/share/opto/node.cpp line 910:
> 908: set_req(i, nullptr);
> 909: }
> 910:
As Claes suggested:
for (uint i = 0; i < req(); ++i) {
if (in(i) != nullptr) {
set_req(i, nullptr);
}
}
src/hotspot/share/opto/node.cpp line 914:
> 912: // Note: Safepoints may have precedence edges, even during parsing
> 913: // Precedences have no embedded NULL
> 914: for (; i < len() && in(i) != nullptr; ++i) {
I don't think it is correct.
src/hotspot/share/opto/node.cpp line 916:
> 914: for (; i < len() && in(i) != nullptr; ++i) {
> 915: set_prec(i, nullptr);
> 916: }
Something like next:
for (uint i = req(); i < len(); ++i) {
if (in(i) != nullptr) {
set_prec(i, nullptr);
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/589
More information about the hotspot-compiler-dev
mailing list