summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-08-28 18:33:10 +0000
committerHal Finkel <hfinkel@anl.gov>2013-08-28 18:33:10 +0000
commit6d09904cc97466446bd6672351865b936a26dd9c (patch)
tree9fca7fd353268a375e8af05e7e34daccff013da5 /llvm/include
parent404fbfedf8b5d0914909050eb17c272dd9460c4c (diff)
downloadbcm5719-llvm-6d09904cc97466446bd6672351865b936a26dd9c.tar.gz
bcm5719-llvm-6d09904cc97466446bd6672351865b936a26dd9c.zip
Disable unrolling in the loop vectorizer when disabled in the pass manager
When unrolling is disabled in the pass manager, the loop vectorizer should also not unroll loops. This will allow the -fno-unroll-loops option in Clang to behave as expected (even for vectorizable loops). The loop vectorizer's -force-vector-unroll option will (continue to) override the pass-manager setting (including -force-vector-unroll=0 to force use of the internal auto-selection logic). In order to test this, I added a flag to opt (-disable-loop-unrolling) to force disable unrolling through opt (the analog of -fno-unroll-loops in Clang). Also, this fixes a small bug in opt where the loop vectorizer was enabled only after the pass manager populated the queue of passes (the global_alias.ll test needed a slight update to the RUN line as a result of this fix). llvm-svn: 189499
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Transforms/Vectorize.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Transforms/Vectorize.h b/llvm/include/llvm/Transforms/Vectorize.h
index 8d0db161160..823c5fba745 100644
--- a/llvm/include/llvm/Transforms/Vectorize.h
+++ b/llvm/include/llvm/Transforms/Vectorize.h
@@ -114,7 +114,7 @@ createBBVectorizePass(const VectorizeConfig &C = VectorizeConfig());
//
// LoopVectorize - Create a loop vectorization pass.
//
-Pass *createLoopVectorizePass();
+Pass *createLoopVectorizePass(bool NoUnrolling = false);
//===----------------------------------------------------------------------===//
//
OpenPOWER on IntegriCloud