Integrated: 8282590: C2: assert(addp->is_AddP() && addp->outcnt() > 0) failed: Don't process dead nodes

Emanuel Peter duke at openjdk.java.net
Tue Mar 22 16:26:38 UTC 2022


On Mon, 7 Mar 2022 15:04:54 GMT, Emanuel Peter <duke at openjdk.java.net> wrote:

> Problem:
> Sometimes nodes are generated, and then not properly added to any other node, nor added to the worklist, so that it could be deleted. In some cases, a node can thus survive after IGVN and enter into `ConnectionGraph::compute_escape`, where no dead nodes are expected (except constants).
> 
> In `ArrayCopyNode::prepare_array_copy`:
> In one, I now add the new ConvI2LNode to the worklist if we are aborting.
> In the other case, I could safely reorder the code, such new ConvI2LNode would only be generated once we know we are not going to abort.
> 
> In `SubTypeCheckNode::Ideal`:
> Replaced `set_req` with `set_req_X`, such that the input-node that is replaced (which is now potentially a dead node) is put on the worklist.
> 
> In `ArrayCopyNode::Ideal`:
> If we decide to `return NULL` we also need to add the potentially dead forward / backward memory nodes to the worklist, they may turn out to be dead.
> 
> Added a regression test: the test + flag combination that first reproduced this issue.
> 
> All Tests, including this new regression test are passing. Tests rerun after small refactorings.

This pull request has now been integrated.

Changeset: d29c7e74
Author:    Emanuel Peter <emanuel.peter at oracle.com>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/d29c7e740d51cb50a1aa0a941a5b460782f8da68
Stats:     39 lines in 3 files changed: 30 ins; 4 del; 5 mod

8282590: C2: assert(addp->is_AddP() && addp->outcnt() > 0) failed: Don't process dead nodes

Reviewed-by: thartmann, chagedorn

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

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


More information about the hotspot-compiler-dev mailing list