RFR (S) JDK-8001345: VM crashes with assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc

Niclas Adlertz niclas.adlertz at oracle.com
Tue Jun 18 00:06:46 PDT 2013


Roland, Vladimir, thank you for the feedback.

http://cr.openjdk.java.net/~adlertz/JDK-8001345/webrev02/

Kind Regards,
Niclas Adlertz


On 17 jun 2013, at 14:43, Niclas Adlertz <niclas.adlertz at oracle.com> wrote:

> Hi all,
> 
> Problem:
> The uses of LoadN / DecodeN nodes can sometimes be optimized away so that they are only used as precedence nodes at MemBarAcquire nodes, which means they are no longer needed.
> They are later removed when building the IFG in the register allocator, after creating the liveness. Usually this is not a problem.
> But if the register allocator decides that one or more virtual registers need to be spilled, and a spilled virtual register X was used at the already removed loadN / decodeN, the split code in reg_split.cpp will create a phi node chain which reaches the place where the loadN / decodeN nodes originally existed. Eventually, this leads to an empty phi node doesn't get removed. Thus, the assert triggers.
> 
> assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
> 
> Solution:
> When the ideal graph has been built, and the ideal() method is called on each node in an attempt to optimize the graph, we look for unnecessary LoadN / DecodeN nodes at MemBarAcquire nodes, and remove them so that no "dead" nodes of this kind can reach the register allocator in the first place. 
> 
> WEBREV: http://cr.openjdk.java.net/~adlertz/JDK-8001345/webrev00
> JBS: https://jbs.oracle.com/bugs/browse/JDK-8001345
> 
> 
> Kind Regards,
> Niclas Adlertz
> 
> 



More information about the hotspot-compiler-dev mailing list