Request for reviews (M): 7107042: assert(no_dead_loop) failed: dead loop detected

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Nov 7 15:43:55 PST 2011


http://cr.openjdk.java.net/~kvn/7107042/webrev

7107042: assert(no_dead_loop) failed: dead loop detected

Late inlining and IGVN may cut off part of ideal graph which become dead. But 
dead code may stay in graph and still be reachable from data nodes (for example 
constants). Region::Ideal() has code to kill not reachable from method's start 
dead code if Region node has only one input (second input path was cut off). But 
it can't eliminate a Region node which has two or more live inputs which are 
loop's back edges. EA may create dead loop Phi nodes if a scalar replaceable 
allocation is referenced inside such dead loops.

Used dead nodes elimination code in PhaseIdealLoop before executing EA. But do 
not execute any loop optimizations to avoid ideal graph reshaping before EA.

Also removed dead nodes from macro_nodes list in remove_useless_nodes().


During testing I hit several other problems and fixed them:

Added missed failing() check after each late inline.

Added missed parenthesis for Verbose output of CMOVE nodes.

A switch value for indirect jumps could be shared but the matcher's code which 
detects it was skipped since incorrect state (Visit instead of Pre_Visit) was used.

Split instance field load through Phi optimization was executed before Phi node 
is processed.

Use PrintCompilation2 instead of PrintInlining flag to print compilation data 
after compilation is finished. Change PrintCompilation2 to diagnostic flag and 
replace it in previous usage (only one) with WizardMode flag.

Tested with CTW, jtreg, NSK, refworkload.

Thanks,
Vladimir


More information about the hotspot-compiler-dev mailing list