RFR: 8317572: C2 SuperWord: refactor/improve TraceSuperWord, replace VectorizeDebugOption with TraceAutoVectorization [v5]

Vladimir Kozlov kvn at openjdk.org
Fri Jan 26 19:12:39 UTC 2024


On Fri, 26 Jan 2024 16:19:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Subtask of https://github.com/openjdk/jdk/pull/16620
>> 
>> I got approval to remove VectorizeDebugOption: [JDK-8320668](https://bugs.openjdk.org/browse/JDK-8320668)
>> 
>> I want a more general flag for AutoVectorization, that can trace different components of AutoVectorization.
>> It should be a CompileCommand, so that it can select which methods it traces for.
>> 
>> TraceSuperWord should still look similar, and select a subset of the TraceAutoVectorization components (those for SuperWord), but still apply to all classes/methods.
>> 
>> With more refactoring later in [JDK-8315361](https://bugs.openjdk.org/browse/JDK-8315361), this flag should become more usable and interpretable. Especially, the idea is that different components of the `VLoop / VLoopAnalyzer` can have tracing enabled / disabled.
>> 
>> **How to use the flag:**
>> Get "help", i.e. see all available tags:
>> `./java -Xcomp -XX:CompileCommand=TraceAutoVectorization,*::*,help --version`
>> 
>> See "rejections" (i.e. failures where we don't vectorize) and successes (using TraceNewVectors):
>> `./java -Xcomp -XX:CompileCommand=TraceAutoVectorization,*::*,SW_REJECTIONS -XX:+TraceNewVectors --version`
>> The results are currently underwhealming. I will have to track many more failures, and I will do that with the bigger refactoring, when I move around the code and require error code returning everywhere, and then I can use that error code for printing.
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix a test

It is good. Two comments.

src/hotspot/share/compiler/compilerOracle.cpp line 779:

> 777:         }
> 778:       }
> 779: #ifndef PRODUCT

Missing `#ifdef COMPILER2` for this and `PrintIdealPhase`.

src/hotspot/share/compiler/directivesParser.cpp line 339:

> 337:             error(VALUE_ERROR, "Unrecognized intrinsic detected in DisableIntrinsic: %s", validator.what());
> 338:           }
> 339:         } else if (strncmp(option_key->name, "TraceAutoVectorization", 22) == 0) {

Missing `#ifndef PRODUCT` and `#ifdef COMPILER2` for this and for `PrintIdealPhase`.

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

PR Review: https://git.openjdk.org/jdk/pull/17586#pullrequestreview-1846370954
PR Review Comment: https://git.openjdk.org/jdk/pull/17586#discussion_r1468038341
PR Review Comment: https://git.openjdk.org/jdk/pull/17586#discussion_r1468039546


More information about the hotspot-compiler-dev mailing list