On Thu, 23 Apr 2026 21:39:03 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>>> @vnkozlov It loops there for a very long time. I believe it is because in 
>>> this scenario, the complexity of `split_unique_types` is quadratic with 
>>> respect to the number of allocations.
>> 
>> Okay, then we need to add `EscapeAnalysisTimeout` check there and restart 
>> compilation without EA.
>> 
>> Are all those allocations scalar replaceable?
>> 
>> May be (new REF) scalar replace allocations only on hot path.  Or give up 
>> running `split_unique_types`  with large number of   allocations. Or other 
>> approach limit time in `split_unique_types`.
>
>> Are all those allocations scalar replaceable?
> 
> yes -- and they are indeed scalar replaced in the smaller accessor methods. 
> But when the accessors get inlined into the main method, since there's loads 
> of accessor calls (64 I think), any cost is magnified by time. And the 
> algorithm sort of get "stuck" analyzing more and more nodes. I don't 
> understand enough of EA to say whether this is a bug or not -- but I couldn't 
> find evidence that it was -- it just seem what the performance model with 
> that analysis.

Thank you, @mcimadamore.  It is known issue (from the beginning) that this part 
of EA if very expensive.
May be we can rework this part to not be quadratic regarding number of 
allocations.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30874#issuecomment-4308529111

Reply via email to