RFR: 8342043: Split Opaque4Node into OpaqueTemplateAssertionPredicateNode and OpaqueNotNullNode

Roland Westrelin roland at openjdk.org
Tue Oct 22 08:33:30 UTC 2024


On Mon, 21 Oct 2024 12:46:16 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> OpaqueTemplateAssertionPredicate is turned into a non-macro node and is removed after loop opts. At that point, loops can no longer be split and we do no need to create Initialized Assertion Predicates from the templates anymore. Thus, they can be cleaned up in the post loop opts IGVN.

The role of an assertion predicate is to catch an out of range input to a range check Cast or Conv nodes. If the `OpaqueTemplateAssertionPredicate` is removed after loop opts then you don't expect out of range values to appear after loop opts are over. But is it really the case? Why wouldn't an igvn later on not cause an out of range value? Also what's the benefit of changing when the opaque node is removed?

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

PR Comment: https://git.openjdk.org/jdk/pull/21608#issuecomment-2428612876


More information about the hotspot-compiler-dev mailing list