[PATCH] D115052: [Passes] Only run extra vector passes if loops have been vectorized.
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 3 11:34:09 PST 2021
aeubanks added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h:98
+/// extra simplifications could be beneficial).
+class ExtraVectorPassManager : public FunctionPassManager {
+ /// Set of passes to run conditionally.
----------------
can `ExtraVectorPassManager` only contain `ConditionalPasses` and we have a separate FPM for the normal passes? separation of concerns, seems like this is doing two things that could be separated
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10754
+ if (Result.MadeCFGChange) {
+ // Making CFG changes likely means a loop got vectorized. Indicate that extra simplification passes should be run.
+ AM.getResult<ShouldRunExtraVectorPasses>(F);
----------------
add a TODO for more precise vectorization tracking?
================
Comment at: llvm/test/Other/opt-pipeline-vector-passes.ll:3
+; RUN: opt -disable-verify -debug-pass-manager -passes='default<O2>' -force-vector-width=4 -S %s 2>&1 | FileCheck %s --check-prefixes=O2
+; RUN: opt -disable-verify -debug-pass-manager -passes='default<O2>' -force-vector-width=0 -extra-vectorizer-passes -S %s 2>&1 | FileCheck %s --check-prefixes=O2
+; RUN: opt -disable-verify -debug-pass-manager -passes='default<O2>' -force-vector-width=4 -extra-vectorizer-passes -S %s 2>&1 | FileCheck %s --check-prefixes=O2_EXTRA
----------------
this should check that we actually don't run the extra passes when there's no vectorization, e.g.
`O2-NOT: Running pass: ...`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115052/new/
https://reviews.llvm.org/D115052
More information about the llvm-commits
mailing list