RFR: 8289943: Simplify some object allocation merges [v13]

Vladimir Ivanov vlivanov at openjdk.org
Fri Nov 11 01:58:34 UTC 2022


On Mon, 7 Nov 2022 02:03:08 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:

> Does it look like a better approach?

It definitely does! Thanks a lot for thinking it through.

> LoadNode::split_through_phi requires is_known_instance_field and therefore can't be run before split_unique_types without changes.

IMO it should be fine to customize `LoadNode::split_through_phi` for our purposes. 

> So, we have to decide if it's best to re-use the code in PhaseMacroExpand::scalar_replacement in adjust_scalar_replaceable_state or if we want to add new code to create SSON for merge Phis in PhaseMacroExpand::scalar_replacement. 

>From design perspective, it's cleaner to modify the IR during `PhaseMacroExpand::scalar_replacement()`, since `ConnectionGraph::adjust_scalar_replaceable_state()` operates solely on `ConnectionGraph` instance being built. 


> Cons: the logic to split merge phi is spread throughout escape analysis and scalar replacement.

It would be helpful to see an implementation sketch to get better understanding how much complexity it adds.

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

PR: https://git.openjdk.org/jdk/pull/9073


More information about the hotspot-compiler-dev mailing list