RFR: 8342393: Promote commutative vector IR node sharing [v26]
Jatin Bhateja
jbhateja at openjdk.org
Mon Feb 24 07:43:09 UTC 2025
On Mon, 24 Feb 2025 06:31:07 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:
>>
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8342393
>> - Safety assertion added
>> - Review resolutions
>> - Lowering feature check to IR annotation level
>> - Adding missed feature check
>> - Review comments resolutions.
>> - Modifed scheme not based over fragile node level flags base solution.
>> - Updating comments for clarity
>> - Adding a missed check to skip over commoning of predicated vector operations
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8342393
>> - ... and 10 more: https://git.openjdk.org/jdk/compare/1e87ff01...acb613da
>
> src/hotspot/share/opto/vectornode.cpp line 1101:
>
>> 1099:
>> 1100: // Sort inputs of commutative non-predicated vector operations to help value numbering.
>> 1101: if (should_swap_inputs_to_help_global_value_numbering()) {
>
> It reads way too verbose to me.
>
> I'd just shape it as:
>
> // Sort inputs of commutative vector operations to help value numbering.
> if (is_commutative()) {
> if (in(1)->_idx > in(2)->_idx) {
> swap_edges(1, 2);
> }
> }
It was modified based on @eme64 suggestion,
https://github.com/openjdk/jdk/pull/22863#discussion_r1942531523
I am inclined to go with what we have to save another approval cycle :-)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22863#discussion_r1967145676
More information about the hotspot-compiler-dev
mailing list