Potential scheduling problem with compressed Oops.
Tom Rodriguez
tom.rodriguez at oracle.com
Mon May 3 10:30:18 PDT 2010
On May 3, 2010, at 4:49 AM, Lindenmaier, Goetz wrote:
> Hi,
>
> we are working on a port of HotSpot for ia64. Currently, we
> enable this port to support compressed Oops.
>
> I ran into an issue where a Decode node was moved above a safepoint
> by the scheduler. A precedence edge was missing to force the node
> behind the safepoint.
Can you describe in more detail why this causes a problem? In general DecodeN and EncodeP can safely span safepoints as long as the anti-deps of their inputs are respected.
tom
> This edge can easily be added if ComputeRegisterAntidependencies()
> not only considers AddP in this code:
>
> 2627 if( n->jvms() ) { // Precedence edge from derived to safept
> 2628 // Check if last_safept_node was moved by pinch-point insertion in anti_do_use()
> 2629 if( b->_nodes[last_safept] != last_safept_node ) {
> 2630 last_safept = b->find_node(last_safept_node);
> 2631 }
> 2632 for( uint j=last_safept; j > i; j-- ) {
> 2633 Node *mach = b->_nodes[j];
> 2634 if( mach->is_Mach() && mach->as_Mach()->ideal_Opcode() == Op_AddP )
> 2635 mach->add_prec( n );
> 2636 }
> 2637 last_safept = i;
> 2638 last_safept_node = m;
> 2639 }
>
> So I changed the code here to test for Op_DecodeN and our problem
> disappeared.
> I want to share this information as I think this can happen on other
> platforms, too. And it was pretty hard to track down.
> We extended the scheduler to consider several blocks, increasing the
> situations where nodes can be moved past Safepoints. But I assume,
> a suiting dataflow graph can appear on other platforms, too. Or is
> there a constraint I missed?
>
> Regards,
> Goetz.
>
>
>
>
>
>
>
>
>
More information about the hotspot-compiler-dev
mailing list