Skip to content

Commit

Permalink
LTO: Add the loop vectorizer to the LTO pipeline.
Browse files Browse the repository at this point in the history
During the LTO phase LICM will move loop invariant global variables out of loops
(informed by GlobalModRef). This makes more loops countable presenting
opportunity for the loop vectorizer.

Adding the loop vectorizer improves some TSVC benchmarks and twolf/ref dataset
(5%) on x86-64.

radar://15970632

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202051 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
aschwaighofer committed Feb 24, 2014
1 parent 35f35ee commit 137342f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Transforms/IPO/PassManagerBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
// Nuke dead stores.
PM.add(createDeadStoreEliminationPass());

// More loops are countable try to vectorize them.
PM.add(createLoopVectorizePass(true, true));

// Cleanup and simplify the code after the scalar optimizations.
PM.add(createInstructionCombiningPass());

Expand Down

0 comments on commit 137342f

Please sign in to comment.