RFR: 8325252: C2 SuperWord: refactor the packset [v4]

Emanuel Peter epeter at openjdk.org
Wed Mar 27 14:50:35 UTC 2024


On Wed, 27 Mar 2024 08:18:06 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use left/right instead of s1/s2 in some obvious simple places
>
> src/hotspot/share/opto/superword.cpp line 2084:
> 
>> 2082:   // Create nodes (from packs and scalar-nodes), and add edges, based on the dependency graph.
>> 2083:   void build() {
>> 2084:     const PackSet& packset = _slp->packset();
> 
> You could also store the pack set as field since you access it several times.

You are right, I could actually remove the SuperWord reference from the `PacksetGraph` completely, and just pass the components, as `const` references. That would be really nice.

If it is ok for you, I will do this in a future RFE.

Actually, I plan to completely overhaul the `PacksetGraph`. It will be transformed to the `VTransformGraph`, and it will do:
- Cycle checking (like today)
- Evaluate the cost-model
- Execute: each node knows how to replace its packed scalar nodes with vector nodes (basically refactoring `SuperWord::output` away)
- etc.

We may even be able to take the `VTransformGraph` and try to widen all nodes, or make transformations on this graph, a simplified version of IGVN. I have lots of ideas that would be unlocked with this new graph-based approach.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18276#discussion_r1541269988


More information about the hotspot-compiler-dev mailing list