RFR: 8342393: Promote commutative vector IR node sharing [v2]
Jatin Bhateja
jbhateja at openjdk.org
Wed Jan 8 10:45:42 UTC 2025
On Tue, 7 Jan 2025 20:47:07 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> removing spaces
>
> src/hotspot/share/opto/vectornode.hpp line 78:
>
>> 76: virtual uint hash() const {
>> 77: if (is_commutative_operation()) {
>> 78: return (uintptr_t)in(1) + (uintptr_t)in(2) + Opcode();
>
> Commutative implies the operation is binary (`req == 3`). Should there be an assert somewhere to ensure it's always the case (ideally, when marking a node as commutative during construction)?
Assertion check added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22863#discussion_r1906981076
More information about the hotspot-compiler-dev
mailing list