]> granicus.if.org Git - llvm/commitdiff
[PM] Add LoopVectorize to the default module pipeline
authorMichael Kuperstein <mkuper@google.com>
Thu, 19 Jan 2017 02:21:54 +0000 (02:21 +0000)
committerMichael Kuperstein <mkuper@google.com>
Thu, 19 Jan 2017 02:21:54 +0000 (02:21 +0000)
LV no longer "requires" LCSSA and LoopSimplify, and instead forms
them internally as required. So, there's nothing preventing it from
being enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292464 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Passes/PassBuilder.cpp
test/Other/new-pass-manager.ll

index 2994a07b1ccf0c690c68ac6986a8c069d59c8dd8..00f8a9dacbc3ed298f81f3ff19d4089a24f485ce 100644 (file)
@@ -496,11 +496,7 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level,
   // rather than on each loop in an inside-out manner, and so they are actually
   // function passes.
   OptimizePM.addPass(LoopDistributePass());
-#if 0
-  // FIXME: LoopVectorize relies on "requiring" LCSSA which isn't supported in
-  // the new PM.
   OptimizePM.addPass(LoopVectorizePass());
-#endif
   // FIXME: Need to port Loop Load Elimination and add it here.
   OptimizePM.addPass(InstCombinePass());
 
index 069d8e214c2e685ff02c36f089f4a95f9352a58b..936da1daff2fa3e1c2482037f1a601fee9d82598 100644 (file)
 ; CHECK-O: Starting llvm::Function pass manager run.
 ; CHECK-O: Running pass: Float2IntPass
 ; CHECK-O: Running pass: LoopDistributePass
+; CHECK-O: Running pass: LoopVectorizePass
 ; CHECK-O: Running pass: InstCombinePass
 ; CHECK-O: Running pass: SLPVectorizerPass
 ; CHECK-O: Running pass: SimplifyCFGPass