From f5d9a1512c3152674d3503f3fc75a2b2cd581037 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 15 Apr 2014 17:48:15 +0000 Subject: [PATCH] LTO: Add more loop simplification passes to LTO Similar to r202051, add missing loop simplification passes to the LTO optimization pipeline. Patch by Rafael Espindola. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206306 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/PassManagerBuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index 4a28b34468b..76f7c1098b0 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -334,7 +334,9 @@ void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM, // Nuke dead stores. PM.add(createDeadStoreEliminationPass()); - // More loops are countable try to vectorize them. + // More loops are countable; try to optimize them. + PM.add(createIndVarSimplifyPass()); + PM.add(createLoopDeletionPass()); PM.add(createLoopVectorizePass(true, true)); // Cleanup and simplify the code after the scalar optimizations. -- 2.34.1