RFR: 8318446: C2: implement StoreNode::Ideal_merge_stores

Emanuel Peter epeter at openjdk.org
Wed Jan 17 14:50:52 UTC 2024


On Wed, 17 Jan 2024 14:44:26 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> So what happens to the range checks in this transformation?

@rwestrel good question:
I start at the "latest" store, and look up the memory graph, also bypassing RangeChecks.
When I decide to merge the stores, I place them at the place of the "latest" store, so after the RangeChecks.
Now you might wonder: what happens if we were to actually fail a RangeCheck?
Answer: I only replace the "latest" store. All earlier ones might still survive igvn if they have other uses,
such as in a uncommon-trap. But they will probably sink out into the uncommon-trap path, and away from
the main path, in which we should hopefully only have the merged store.

Does that answer your question?

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

PR Comment: https://git.openjdk.org/jdk/pull/16245#issuecomment-1895965350


More information about the hotspot-compiler-dev mailing list