Request for reviews (M): 6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Fri Jul 25 10:56:03 PDT 2008


http://webrev.invokedynamic.info/kvn/6726999/index.html

Fixed 6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")

Problem:
The flow-insensitive escape analysis can't separate cases
when an allocation happened on the main path or in a loop
or on a different control branch. A dominator info processing
may not find it when such allocation is referenced further
in a graph:
     Point p[] = new Point[1];
     if ( x ) p[0] = new Point();
     if (p[0] != NULL) p[0].x = x;

The main cause of it is that a default initialization by NULL
captured by Initialize node is not recorded in EA Connection Graph.
As result EA thinks that there is only one value - new object and
mark it as scalar replaceable. For scalar replaceable objects
we do aggressive memory nodes moves (for example, skip calls).
And this is where the dominator info processing hits the problem
when it tries to find the place where to put a memory node.

Solution:
- Add a field's initialization by NULL to Connection Graph if it is
   not recorded already.
- Disable scalar replacement if the object reference is stored into
   unknown element of an array of objects (in a loop, for example).

Other fixes:
- Disable scalar replacement if a object's field is referenced
   by LoadStore node (CompareAndSwapL, for example) since
   the field value is unknown after it.
   Also add missing checks for LoadStore node where there are checks
   for memory nodes since LoadStore is not memory node.
- Prevent incorrect removal of MemBarAcquire node's input
   in Block::schedule_local().
- Add missing check for CompareAndSwapN in split_if_with_blocks_pre().
- Add the check for phis with one unique input in SuperWord::construct_bb()
   to avoid the assert in SuperWord::mem_slice_preds().
- Change legal header in test files added recently.

New optimizations:
- Set AddP node's Base and Address to the corresponding scalar replaceable
   allocation projection.
- Increase the recursion limit to 1000 in PhaseMacroExpand::value_from_mem_phi()
   when searching for fields values during scalar replacement processing.

Added new regression test with several cases for EA.

Reviewed by:
Fix verified (y/n): y, failed test cases.

Other testing:
JPRT, CTW, NSK testing, JDI and HS REGRESSION tests.
All with 32 and 64-bits VM and Compressed Oops.





More information about the hotspot-compiler-dev mailing list