RFR: 8302652: [SuperWord] Reduction should happen after loop, when possible [v2]
Emanuel Peter
epeter at openjdk.org
Mon May 8 07:15:24 UTC 2023
On Mon, 8 May 2023 06:54:43 GMT, Pengfei Li <pli at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> copy node notes with igvn registering
>
> src/hotspot/share/opto/loopopts.cpp line 4305:
>
>> 4303:
>> 4304: // Turn the scalar phi into a vector phi.
>> 4305: _igvn.rehash_node_delayed(phi);
>
> Is it possible to setup the vector phi first, and then replace all reduction nodes by vector accumulators via calling `_igvn.replace_node()`? Current code here looks a bit wordy.
If I set up the phi first, then where do I keep the `init` value? I have to make sure it has a use throughout the transformation, other wise it may think it is `dead`.
> src/hotspot/share/opto/loopopts.cpp line 4318:
>
>> 4316:
>> 4317: #ifdef ASSERT
>> 4318: if (TraceNewVectors) {
>
> Not sure if this is required. But I haven't seen the creation of vector phi is traced in other places.
Do we even have any other Vector Phi's? SuperWord never does it. Maybe in the Vector API?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13056#discussion_r1187104346
PR Review Comment: https://git.openjdk.org/jdk/pull/13056#discussion_r1187102352
More information about the hotspot-compiler-dev
mailing list