Request for reviews (M): 7105605: Use EA info to optimize pointers compare

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Nov 9 07:58:48 PST 2011


Thank you, Christian

Christian Thalinger wrote:
> On Nov 9, 2011, at 5:27 AM, Vladimir Kozlov wrote:
> 
>> http://cr.openjdk.java.net/~kvn/7105605/webrev
> 
> src/share/vm/opto/escape.cpp:
> 
> You should set _pcmp_neq and _pcmp_eq to NULL in the ConnectionGraph constructor.

Done. I also added assert in optimize_ptr_compare() to check that 
OptimizePtrCompare is set.

> 
> ConnectionGraph::do_analysis:
> 
> +   Node* pcmp_neq = OptimizePtrCompare ? igvn->makecon(TypeInt::CC_GT) : NULL;
> +   Node* pcmp_eq  = OptimizePtrCompare ? igvn->makecon(TypeInt::CC_EQ) : NULL;
> 
> Are these two also added for the same reason as the comment says?
> 
>     // Add ConP#NULL and ConN#NULL nodes before ConnectionGraph construction
>     // to create space for them in ConnectionGraph::_nodes[].
> 
> Weird.

In general sense they don't need to be created before ConnectionGraph 
construction since they are not oops and not part of constructed graph. But EA 
have several checks that C->_unique stays the same during graph construction and 
they will fail if pcmp_* nodes are added lazily.

> 
> ConnectionGraph::optimize_ptr_compare:
> 
> Is it intentional that the variables are called "has_unknow_obj1" instead of "unknown"?

Typo and terrible name. I renamed it to set1_has_unknown_ptr. And renamed 
has_null_ptr1 to set1_has_null_ptr.

> 
> Otherwise this looks good, as far as I can tell.

Thanks,
Vladimir

> 
> -- Chris
> 
>> 7105605: Use EA info to optimize pointers compare
>>
>> EA Connection Graph can help to optimize pointers compare for non escaping allocations.
>>
>> Tested with CTW, jtreg, NSK, refworkload.
>>
>> Thanks,
>> Vladimir
> 


More information about the hotspot-compiler-dev mailing list