summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-04-30 21:29:20 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-04-30 21:29:20 +0000
commit4e1ac95cf5802a041a847b9feb8f215558b447fc (patch)
tree5097c99b67f140bca5ea917603584c3f04593091 /llvm/lib/Transforms
parentd407b4b980d41bc46a2b4678b7d39cb81779fb08 (diff)
downloadbcm5719-llvm-4e1ac95cf5802a041a847b9feb8f215558b447fc.tar.gz
bcm5719-llvm-4e1ac95cf5802a041a847b9feb8f215558b447fc.zip
[PassManagerBuilder] Add option for interleaved loops, for loop vectorize.
Summary: Match NewPassManager behavior: add option for interleaved loops in the old pass manager, and use that instead of the flag used to disable loop unroll. No changes in the defaults. Reviewers: chandlerc Subscribers: mehdi_amini, jlebar, dmgreen, hsaito, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61030 llvm-svn: 359615
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index eeb196866ea..e8b4b8fe75b 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -162,9 +162,7 @@ PassManagerBuilder::PassManagerBuilder() {
DisableUnrollLoops = false;
SLPVectorize = RunSLPVectorization;
LoopVectorize = EnableLoopVectorization;
- // FIXME: Add: LoopsInterleaved = EnableLoopInterleaving;
- // Replace usage of DisableUnrollLoops with LoopsInterleaved when creating
- // the LoopVectorize pass, to be consistent with the new pass manager.
+ LoopsInterleaved = EnableLoopInterleaving;
RerollLoops = RunLoopRerolling;
NewGVN = RunNewGVN;
LicmMssaOptCap = SetLicmMssaOptCap;
@@ -673,7 +671,7 @@ void PassManagerBuilder::populateModulePassManager(
// llvm.loop.distribute=true or when -enable-loop-distribute is specified.
MPM.add(createLoopDistributePass());
- MPM.add(createLoopVectorizePass(DisableUnrollLoops, !LoopVectorize));
+ MPM.add(createLoopVectorizePass(!LoopsInterleaved, !LoopVectorize));
// Eliminate loads by forwarding stores from the previous iteration to loads
// of the current iteration.
OpenPOWER on IntegriCloud