RFR(S): 8203425: assert(is_Loop()) failed: invalid node class
nils.eliasson at oracle.com
Wed May 23 12:14:59 UTC 2018
This is a follow up to JDK-8203215 that caused failures in testing.
JDK-8203215 added a call to igvn.optimize after beautify_loops to handle
phi-nodes that have lost their loop edge and now produce loop invariant
data. In testing a failure came up - the igvn.optimize call can
sometimes eliminate a loop node when the phis are all invariant.
When fixing this I observed that a loop might be removed, and that
another region that is a subset of the first is selected as new loop,
and then there might be new loop invariant phis (not observed).
This change introduces a fix point iteration for beautify_loops, until
no more loop structure changes has been made. This might sound expensive
but In practice beautify-loops is called one additional time at first
insertion of loop-nodes. I have seen one case of cascading loop
reductions when beautify_loops is called three times. The upside is that
we reach fix point for PhaseIdealLoop faster since these changes would
guarantee to trigger a major change in next iteration instead.
More information about the hotspot-compiler-dev