RFR: 8354282: C2: more crashes in compiled code because of dependency on removed range check CastIIs [v2]

Roland Westrelin roland at openjdk.org
Wed Oct 1 12:52:42 UTC 2025


On Wed, 23 Apr 2025 10:49:41 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - merge
>>  - Merge branch 'master' into JDK-8354282
>>  - fix & test
>
> src/hotspot/share/opto/castnode.cpp line 39:
> 
>> 37: const ConstraintCastNode::DependencyType ConstraintCastNode::WidenTypeDependency(true, false, "widen type dependency"); // not pinned, doesn't narrow type
>> 38: const ConstraintCastNode::DependencyType ConstraintCastNode::StrongDependency(false, true, "strong dependency"); // pinned, narrows type
>> 39: const ConstraintCastNode::DependencyType ConstraintCastNode::UnconditionalDependency(false, false, "unconditional dependency"); // pinned, doesn't narrow type
> 
> Is there really a good reason to have the names `Regular`, `WidenType`, `Strong` and `Unconditional`? Did we just get used to these names over time, or do they really have a good reason for existance. They just don't really mean that much to me. Calling them (non)pinned and (non)narrowing would make more sense to me.

So `NonPinnedNarrowingDependency`, `NonPinnedNonNarrowingDependeny`, `PinnedNarrowingDependency` and `NonPinnedNonNarrowingDependency`?

Or to avoid using a negation for the one that's the weakest dependency:

`FloatingNarrowingDependency`, `FloatingNonNarrowingDependency`, `NonFloatingNarrowingDependency` and `NonFloatingNonNarrowingDependency `?

What do you think @eme64 ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24575#discussion_r2394460598


More information about the hotspot-compiler-dev mailing list