RFR(S): 8069191: moving predicate out of loops may cause array accesses to bypass null check

Roland Westrelin roland.westrelin at oracle.com
Tue Mar 17 10:54:11 UTC 2015


In the test (that needs to be run with StressGCM to cause incorrect code generation), a dependency carried by a CastPP is lost when CastPPs are removed after CCP. Detailed description of the bug is in:


Vladimir suggested investigating the performance impact of keeping the CastPPs for the entire compilation. I found that this still causes performance regressions as documented in:


The fix I suggest is to keep CastPPs during optimizations and remove then during final graph reshaping. To not loose the dependencies they carry, precedence edges are added to memory operations that depend on them. During GCM, the control of the memory operations to take the current control and the precedence edges.

Experiments show that this scheme doesn’t cause performance regressions (I ran promotion testing on x64 and sparc).


More information about the hotspot-compiler-dev mailing list