diff options
author | Alina Sbirlea <asbirlea@google.com> | 2019-05-23 18:51:02 +0000 |
---|---|---|
committer | Alina Sbirlea <asbirlea@google.com> | 2019-05-23 18:51:02 +0000 |
commit | 267ac925fb4ed2dad94177807d9a38ba83f2f4f0 (patch) | |
tree | ec73ae04ec6e0fce2bfe49f356f9ff6613723c6d /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 3249be1e03c672ffe68f5ad8e0e31cdcb8e441f8 (diff) | |
download | bcm5719-llvm-267ac925fb4ed2dad94177807d9a38ba83f2f4f0.tar.gz bcm5719-llvm-267ac925fb4ed2dad94177807d9a38ba83f2f4f0.zip |
[NewPassManager] Add tuning option: SLPVectorization [clang-change]
Summary:
NewPassManager is not using CodeGenOpts values before this patch.
[to be coupled with D61616]
Reviewers: chandlerc
Subscribers: jlebar, cfe-commits, llvm-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61617
llvm-svn: 361534
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 32eb776a6d2..1dbeec1c178 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -1050,7 +1050,14 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( 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) { |