Request for reviews (M): 6674600, 6259129 (last Escape Analysis changes for HS12)

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Wed Mar 19 14:21:38 PDT 2008


It's a good question.  For that matter, I don't understand why 
subsume_node doesn't automatically call hash_delete for you.  In some 
places we do put things on the worklist but not in others and who knows 
if there's a good reason for it.  I'd generally assume no but I know 
there are places in loopopts where things are explicitly removed from 
the worklist to discourage commoning.  This is generally done for moving 
loop invariant operations out of loops and seems like a hack.

Anyway, I'd love to see subsume_node automatically hash_delete and 
add_users_to_worklist.

tom

Vladimir Kozlov wrote:
> Chuck suggested to add a new method for the next sequence
> which I used very often in macro.cpp (6259129 changes):
> I added new method into PhaseIterGVN:
> 
> 
> +  // Replace old node with new one.
> +  void replace_node( Node *old, Node *nn ) {
> +    add_users_to_worklist(old);
> +    hash_delete(old);
> +    subsume_node(old, nn);
> +  }
> +
> 
> But I am wondering why we not always put users of old node
> on worklist in subsume_node()?
> 
> Thanks,
> Vladimir
> 
> Vladimir Kozlov wrote:
>> Thank you for previous reviews.
>>
>> Here are my last EA changes for HS12.
>>
>> Note: both changesets have similar memory walking code but
>> I don't want to optimize/combine this code now. I will do it later.
>>
>> Thanks,
>> Vladimir
>>
>> ---------------------------------------------------------------------------- 
>>
>> http://webrev.invokedynamic.info/kvn/6674600/index.html
>>
>> Fixed 6674600: (Escape Analysis) Optimize memory graph for instance's 
>> fields
>>
>> Problem:
>> To reallocate a scalarized object during a deoptimization we need
>> to know the state (values) of object's non-static fields at a safepoint.
>>
>> Solution:
>> Use aggressive memory optimizations during Iterative GVN
>> to obtain values assigned to instance's non-static fields.
>>
>> ---------------------------------------------------------------------------- 
>>
>> http://webrev.invokedynamic.info/kvn/6259129/index.html
>>
>> Fixed 6259129: (Escape Analysis) scalar replacement for non-escaping 
>> objects
>>
>> Problem:
>> To reallocate a scalarized object during a deoptimization we need
>> to know the state (values) of object's non-static fields at a safepoint.
>>
>> Solution:
>> Replace non-escaping allocations with SafePointScalarObjectNode
>> for a scalar replacement during macro expansion of Allocate nodes.
>> Do an additional memory search to obtain values assigned to instance's
>> non-static fields. Disable scalar replacement if a field's value
>> can't be found.
>> ---------------------------------------------------------------------------- 
>>
> 



More information about the hotspot-compiler-dev mailing list