summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2018-12-18 17:46:09 +0000
committerMichael Kruse <llvm@meinersbur.de>2018-12-18 17:46:09 +0000
commitd4eb13c88061d90cf6b8848ade1b38b8b94b509e (patch)
treef3c4ccbf5a9b73efb2e85aabef98263aa9bfbedf /llvm/lib/Transforms/IPO
parentea79468b41ed840e9078a2910a8de73d4108c31d (diff)
downloadbcm5719-llvm-d4eb13c88061d90cf6b8848ade1b38b8b94b509e.tar.gz
bcm5719-llvm-d4eb13c88061d90cf6b8848ade1b38b8b94b509e.zip
[LoopVectorize] Rename pass options. NFC.
Rename: NoUnrolling to InterleaveOnlyWhenForced and AlwaysVectorize to !VectorizeOnlyWhenForced Contrary to what the name 'AlwaysVectorize' suggests, it does not unconditionally vectorize all loops, but applies a cost model to determine whether vectorization is profitable to all loops. Hence, passing false will disable the cost model, except when a loop is marked with llvm.loop.vectorize.enable. The 'OnlyWhenForced' suffix (suggested by @hfinkel in D55716) better matches this behavior. Similarly, 'NoUnrolling' disables the profitability cost model for interleaving (a term to distinguish it from unrolling by the LoopUnrollPass); rename it for consistency. Differential Revision: https://reviews.llvm.org/D55785 llvm-svn: 349513
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index 268939e8247..60bd6def6ce 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -637,7 +637,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(DisableUnrollLoops, !LoopVectorize));
// Eliminate loads by forwarding stores from the previous iteration to loads
// of the current iteration.
@@ -875,7 +875,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
PM.add(createSimpleLoopUnrollPass(OptLevel,
DisableUnrollLoops)); // Unroll small loops
- PM.add(createLoopVectorizePass(true, LoopVectorize));
+ PM.add(createLoopVectorizePass(true, !LoopVectorize));
// The vectorizer may have significantly shortened a loop body; unroll again.
PM.add(createLoopUnrollPass(OptLevel, DisableUnrollLoops));
OpenPOWER on IntegriCloud