RFR: 8268882: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
Rickard Bäckman
rbackman at openjdk.java.net
Fri Nov 5 06:27:27 UTC 2021
On Fri, 5 Nov 2021 06:19:25 GMT, Rickard Bäckman <rbackman at openjdk.org> wrote:
> Also delete Phi nodes with no uses.
The cause of hitting this assert seems to be as follows:
In regalloc the compiler decides to split a live range, generates a bunch of Phi nodes.
Later after coalescing, the need to spill has gone away and Phi nodes are now starting to be deleted.
Before this change this problematic Phi node is left in the graph because it has two inputs, two loadcon of the same
value. However The regalloc only checks for reference equality when determining if a Phi node can be deleted due to a single unique input.
Adding this check to also delete Phi nodes with no outs in this later stage makes sure these Phi nodes gets deleted as well.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6270
More information about the hotspot-compiler-dev
mailing list