RFR: 8356328: Some C2 IR nodes miss size_of() function [v2]

kuaiwei duke at openjdk.org
Thu May 8 12:04:52 UTC 2025


On Thu, 8 May 2025 06:51:08 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> src/hotspot/share/opto/intrinsicnode.hpp line 201:
>> 
>>> 199:   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
>>> 200:   virtual const Type* Value(PhaseGVN* phase) const;
>>> 201:   virtual uint size_of() const { return sizeof(EncodeISOArrayNode); }
>> 
>> Shouldn't nodes that define fields also override `Node::cmp` and `Node::hash`?
>
> Ah, I see that Christian already asked that :)

I checked some nodes. `cmp/hash` are not always updated for new fields. It looks "nice to have". I have added `cmp/hash` for “EncodeISOArrayNode/ClearArrayNode/OpaqueMultiversioningNode" .

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25081#discussion_r2079582101


More information about the hotspot-compiler-dev mailing list