RFR: 8351414: C2: MergeStores must happen after RangeCheck smearing
Quan Anh Mai
qamai at openjdk.org
Mon Mar 10 12:04:29 UTC 2025
On Fri, 7 Mar 2025 15:07:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> With [JDK-8348959](https://bugs.openjdk.org/browse/JDK-8348959) we see that there can be some issues when RangeCheck smearing happens in the same IGVN phase as MergeStores. It means that some RangeChecks are still around as we do MergeStores, and then we cannot merge as many stores as we would like. We should ensure that RangeCheck smearing happens during post-loop-opts, and then MergeStores happens in a separate dedicated IGVN round afterwards.
Do you think it would make sense to make a dedicated `PhaseMergeStores` instead?
I would imagine `PhaseMergeStores` that looks at all stores in the graph, does the analysis and the transformation, then we can run another round of IGVN after that. I think a global view would be easier and more efficient than the local view from `StoreNode::Ideal`. Since `StoreNode::Ideal` needs to ensure that there is no store after it and just bail out otherwise.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23944#issuecomment-2706781634
PR Comment: https://git.openjdk.org/jdk/pull/23944#issuecomment-2706834193
More information about the hotspot-compiler-dev
mailing list