[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 16:07:15 PDT 2019


asbirlea created this revision.
asbirlea added a reviewer: chandlerc.
Herald added subscribers: cfe-commits, jlebar.
Herald added a project: clang.

NewPassManager is not using CodeGenOpts values before this patch.
[to be coupled with D61616 <https://reviews.llvm.org/D61616>]


Repository:
  rC Clang

https://reviews.llvm.org/D61617

Files:
  lib/CodeGen/BackendUtil.cpp


Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp
+++ lib/CodeGen/BackendUtil.cpp
@@ -1023,7 +1023,14 @@
                           CodeGenOpts.DebugInfoForProfiling);
   }
 
-  PassBuilder PB(TM.get(), PipelineTuningOptions(), PGOOpt);
+  PipelineTuningOptions PTO;
+  // For historical reasons, loop interleaving is set to mirror setting for loop
+  // unrolling.
+  PTO.LoopInterleaving = CodeGenOpts.UnrollLoops;
+  PTO.LoopVectorization = CodeGenOpts.VectorizeLoop;
+  PTO.SLPVectorization = CodeGenOpts.VectorizeSLP;
+
+  PassBuilder PB(TM.get(), PTO, PGOOpt);
 
   // Attempt to load pass plugins and register their callbacks with PB.
   for (auto &PluginFN : CodeGenOpts.PassPlugins) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61617.198361.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190506/bd1183ee/attachment.bin>


More information about the llvm-commits mailing list