RFR: 8351280: Mark Assertion Predicates useless instead of replacing them by a constant directly [v2]
Christian Hagedorn
chagedorn at openjdk.org
Fri Mar 7 09:29:31 UTC 2025
On Fri, 7 Mar 2025 08:55:47 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make OpaqueInitializedAssertionPredicateNode NO_HASH
>
> src/hotspot/share/opto/opaquenode.cpp line 142:
>
>> 140: bool OpaqueInitializedAssertionPredicateNode::cmp(const Node &n) const {
>> 141: return _useless == n.as_OpaqueInitializedAssertionPredicate()->is_useless();
>> 142: }
>
> Ah interesting. But do we ever want to common these nodes?
> If we never want to common them, you could just fix it with the hash, right?
>
> 35 class Opaque1Node : public Node {
> 36 virtual uint hash() const ; // { return NO_HASH; }
I thought it does not matter if they common up. But maybe it does in some edge cases when we have two Initialized Assertion Predicates have that the very same condition but one should be removed. Anyway, might be safer to just not allow it. I think the effect should be negligible in terms of performance/footprint. Pushed an update
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23941#discussion_r1984729158
More information about the hotspot-compiler-dev
mailing list