RFR: 8341293: Split field loads through Nested Phis

Emanuel Peter epeter at openjdk.org
Wed Nov 20 10:14:27 UTC 2024


On Mon, 30 Sep 2024 16:23:05 GMT, Dhamoder Nalla <dhanalla at openjdk.org> wrote:

> As an extension of the work done as part of https://github.com/openjdk/jdk/pull/12897, split the field loads (AddP -> Load*) with nested phi parent nodes to enable more scalar replacements, thereby reducing memory allocation.
> 
> 
> Here are the sequence of Ideal graph transformations for Nested phi:
> 
>  
> ![image](https://github.com/user-attachments/assets/c18e5ca0-c554-475c-814a-7cb288d96569)
> 
> ![image](https://github.com/user-attachments/assets/b279b5f2-9ec6-4d9b-a627-506451f1cf81)
> 
> ![image](https://github.com/user-attachments/assets/f506b918-2dd0-4dbe-a440-ff253afa3961)

Looks interesting. We are getting close to JDK25 fork, so we should make sure to wait until then, because these kinds of changes have long bug-tails.

Can you show the benchmark numbers from your micro-benchmark?

test/micro/org/openjdk/bench/vm/compiler/AllocationMergesNestedPhi.java line 2:

> 1: /*
> 2:  * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.

Drive-by comment: fix copyright header date

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

Changes requested by epeter (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21270#pullrequestreview-2448152603
PR Review Comment: https://git.openjdk.org/jdk/pull/21270#discussion_r1850013901


More information about the hotspot-compiler-dev mailing list