Request for reviews (M): 7105605: Use EA info to optimize pointers compare
tom.rodriguez at oracle.com
Thu Nov 10 11:25:43 PST 2011
On Nov 9, 2011, at 11:27 AM, Vladimir Kozlov wrote:
> Thank you, Tom
> Tom Rodriguez wrote:
>> I like the renaming you did in optimize_ptr_compare. This comment:
>> + // Check if one set has only not escaping allocations.
>> seems like it needs more detail explaining why that's important. I presume it's because if they are all non-escaping then they must be disjoint from the other set. Is that right?
> There is explicit disjoint check (!ptset1.disjoint(ptset2)) before that code. It guaranties that not escaping allocations from one set are not present in second set. And they did not lost their identity since they did not escape.
Then I'm unclear what this logic is trying to capture. Can you give me an example?
>> Does the _scalar_replaceable flag change any of this? I thought if that was false then we might lose track of the identity of the object.
> No, if Connection Graph is correct. I actually hit problem today with OSR state loads which were not marked as loads of unknown object.
> The condition "set has only not escaping allocations" means java code merged only non escaping allocations and Connection Graph knowns which allocations.
>> How effective is this at eliminating compares? Is it useful even if there aren't non-escaping object?
> Unfortunately I don't see improvement in refworkload. I added test case which shows that this optimization eliminates next check in HashMap.get():
> (k = e.key) == key
> But in JBB it is already eliminated by EliminateAutoBox optimization.
>> On Nov 8, 2011, at 8:27 PM, Vladimir Kozlov wrote:
>>> 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.
More information about the hotspot-compiler-dev