Request for reviews (S): 6973329: C2 with Zero based COOP produces code with broken anti-dependency on x86

Tom Rodriguez tom.rodriguez at oracle.com
Tue Aug 10 11:32:19 PDT 2010


I think that looks good.  Not using must_clone nodes in implicit null checks is a good fix.

tom

On Aug 10, 2010, at 11:17 AM, Vladimir Kozlov wrote:

> http://cr.openjdk.java.net/~kvn/6973329/webrev
> 
> Fixed 6973329: C2 with Zero based COOP produces code with broken anti-dependency on x86
> 
> Main problem: RA ignores anti-dependence when placing a clone of
> a node which produces flags (or any rematerializable nodes).
> The code generating implicit_null_check may move such nodes
> above nodes modifying flags which will force RA to clone it.
> 
> Solution:
> Recompile without subsuming loads if RA try to clone a node with anti_dependence.
> Do not use nodes which produce flags in implicit null checks.
> 
> Added regression test based on failure I saw in SPECjEnterprise2010.
> 
> JPRT, SPECjEnterprise2010
> 
> Notes:
> I collected statistic about how many dependences are found per
> each call to insert_anti_dependences(). And how many recompilation
> without subsuming loads and total bailout happened in new RA code.
> 
> CTW rt.jar:
> 1431559 made anti_dependence checks, 5497392 found anti_dependences (384%),
> 128477 did not find anti_dependences ( 8%)
> 
> jvm2008:
> 200020 made anti_dependence checks, 724530 found anti_dependences (362%),
> 10339 did not find anti_dependences ( 5%)
> 
> Originally I thought about adding new Node flag has_anti_dependence which I
> would set in insert_anti_dependences() and check it in the clone_node() in RA.
> But looking on this statistic I decided to use existing flag
> needs_anti_dependence_check. After that number of recompilation without
> subsuming loads changed from 115 to 127 (in CTW rt.jar). I think it is acceptable.
> 
> Next I found that this recompilation number could be significantly reduced
> if I exclude nodes which produce flags from implicit null checks.
> 
> Before:
> CTW rt.jar:
> RA: 127 recompile without subsume_loads, 0 bailout compilation
> jvm2008:
> RA: 140 recompile without subsume_loads, 0 bailout compilation
> 
> After:
> CTW rt.jar:
> RA: 39 recompile without subsume_loads, 0 bailout compilation
> jvm2008:
> RA: 3 recompile without subsume_loads, 0 bailout compilation
> 
> 



More information about the hotspot-compiler-dev mailing list