Skip to content

Commit 32bcf5d

Browse files
committed
enable the SLP Vectorizer optimization pass by default
1 parent bfb1c1b commit 32bcf5d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,9 @@ Compiler/Runtime improvements
664664
* Inference now propagates constants inter-procedurally, and can compute
665665
various constants expressions at compile-time ([#24362]).
666666

667+
* The LLVM SLP Vectorizer optimization pass is now enabled at the default
668+
optimization level.
669+
667670
Deprecated or removed
668671
---------------------
669672

src/jitlayers.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,9 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, bool dump
238238
PM->add(createLoopIdiomPass());
239239
PM->add(createLoopDeletionPass()); // Delete dead loops
240240
PM->add(createJumpThreadingPass()); // Thread jumps
241-
242-
if (opt_level >= 3) {
243-
PM->add(createSLPVectorizerPass()); // Vectorize straight-line code
244-
}
245-
241+
PM->add(createSLPVectorizerPass()); // Vectorize straight-line code
246242
PM->add(createAggressiveDCEPass()); // Delete dead instructions
247-
if (opt_level >= 3)
248-
PM->add(createInstructionCombiningPass()); // Clean up after SLP loop vectorizer
243+
PM->add(createInstructionCombiningPass()); // Clean up after SLP loop vectorizer
249244
PM->add(createLoopVectorizePass()); // Vectorize loops
250245
PM->add(createInstructionCombiningPass()); // Clean up after loop vectorizer
251246
// LowerPTLS removes an indirect call. As a result, it is likely to trigger

0 commit comments

Comments
 (0)