RFR (M): 8004640: C2 assert failure in memnode.cpp: NULL+offs not RAW address?

Christian Thalinger christian.thalinger at oracle.com
Tue Mar 26 12:41:25 PDT 2013


On Mar 26, 2013, at 11:49 AM, Christian Thalinger <christian.thalinger at oracle.com> wrote:

> src/share/vm/opto/phaseX.cpp:
> 
> -      // Remove from iterative worklist
> -      _worklist.remove(dead);
> 
> I don't understand this change.  Before we removed all dead nodes from the stack:
> 
> 1160   while (_stack.is_nonempty()) {
> 
> But now we remove only the last one?  Are all nodes on the stack in one sub-graph?

Sorry, I was confused by all the braces and indenting and didn't see that the logic at the end of the diff is inside the while.

Looks good.

-- Chris

> 
> -- Chris
> 
> On Mar 25, 2013, at 5:25 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> 
>> http://cr.openjdk.java.net/~kvn/8004640/webrev/
>> 
>> IdealKit does not call transform() for raw address when generates post barrier code and C2 type system does not accept such type. AddPNode::Ideal() should be called to transform raw (NULL+offs) to CastX2P(offs). We got NULL as base because cardmark byte_map_base is 0x0 which is valid value.
>> 
>> IdealKit delays transformations to avoid graph collapsing before it is finished. But delaying logic is broken because during Parse phase PhaseGVN::transform() does not replace old node with new transformed one.
>> 
>> Fix: always transform AddP nodes in IdealKit by calling _gvn.transform().
>> 
>> Clean delaying logic only to register new nodes for igvn and don't do useless delayed transformations. Also remove is_IterGVN() checks since IdealKit works only during Parse phase.
>> 
>> An other possible cause of the failure is to get dead nodes on IGVN _worklist. I looked on recent changes and did some modifications. In PhaseIdealLoop::build_and_optimize() moved dead nodes cleanup back after build_loop_late(). Used replace_edge(in, NULL) in remove_globally_dead_node() to cut all edges pointed to dead node and did other rearrangements in that method.
>> 
>> Tested with compiler jtreg, ctw, jprt. Did additional testing with GraphKit::byte_map_base_node() always returning null() with -XX:+OptoNoExecute.
>> 
>> Thanks,
>> Vladimir
> 



More information about the hotspot-compiler-dev mailing list