RFR: 8263577: C2: reachable nodes shouldn't have dead uses at the end of optimizations

Vladimir Ivanov vlivanov at openjdk.java.net
Mon Mar 15 13:53:16 UTC 2021


On Mon, 15 Mar 2021 12:33:19 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> It's not uncommon for c2 to leave dead uses hanging from reachable
> nodes. It's usually harmless but can cause confusion (such as in
> valhalla JDK-8262289, not reproducible with non valhalla code AFAICT).
> 
> Most of the time, these are caused by calls to set_req() during igvn
> that should be set_req_X() calls. I added a verification pass at the
> end of optimization and fixed all the ones I found.

Looks good.

Changes in `src/hotspot/share/opto/subtypenode.cpp` don't look relevant. I assume new verification logic uncovered a problem there. Does it make sense to integrate the fix separately?

src/hotspot/share/opto/node.hpp line 458:

> 456:   }
> 457:   int replace_edge(Node* old, Node* neww, PhaseGVN* gvn = NULL);
> 458:   int replace_edges_in_range(Node* old, Node* neww, int start, int end, PhaseGVN* gv);

s/gv/gvn/

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

Marked as reviewed by vlivanov (Reviewer).

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


More information about the hotspot-compiler-dev mailing list