summaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-06-25 01:49:44 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-06-25 01:49:44 +0000
commitfdf137b9073aa52423183fe886d072bc3b7d3889 (patch)
tree0ae47106ce4c5d21cdba62ccd572db30e40f2812 /lib/CodeGen/BackendUtil.cpp
parent9db7f57c1e3db8a2d06a833a4e0341f0fe310640 (diff)
downloadclang-fdf137b9073aa52423183fe886d072bc3b7d3889.tar.gz
clang-fdf137b9073aa52423183fe886d072bc3b7d3889.tar.bz2
clang-fdf137b9073aa52423183fe886d072bc3b7d3889.tar.xz
Make -vectorize-... proper cc1 flags instead of abusing -backend-option. Fixes
usage of clang as a library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 7d1a3c82e8..e3a44f982d 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -220,6 +220,9 @@ void EmitAssemblyHelper::CreatePasses(TargetMachine *TM) {
PassManagerBuilderWrapper PMBuilder(CodeGenOpts, LangOpts);
PMBuilder.OptLevel = OptLevel;
PMBuilder.SizeLevel = CodeGenOpts.OptimizeSize;
+ PMBuilder.BBVectorize = CodeGenOpts.VectorizeBB;
+ PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP;
+ PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop;
PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime;
PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;