RFR: 8373495: C2: Aggressively fold loads from objects that have not escaped [v5]

Vladimir Kozlov kvn at openjdk.org
Fri Dec 12 19:51:59 UTC 2025


On Fri, 12 Dec 2025 03:56:47 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   more detailed explanations
>
> The sufficient condition to decide that a freshly allocated object does not escape in a region bounded by the allocation and a call is that there is no action in that region that makes the object escape. This means that there is no node that escapes the object which has the call as a transitive use.
> 
> As a result, my solution here is to find all nodes that escape the object, then mark all of its transitive uses as escape. I believe you want to do it in the opposite way, that is, to try to find the nodes that escape the freshly allocated object from a call. But that means that we need to traverse all the transitive inputs of the call, which seems unrealistic for something running in `IterGVN`. Am I understanding it correctly?

@merykitty thank you for updating comment.

Do you have any performance numbers for some well known benchmarks?

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

PR Comment: https://git.openjdk.org/jdk/pull/28764#issuecomment-3647917679


More information about the hotspot-compiler-dev mailing list