mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[LTO] Add a run of LoopUnroll
Loop trip counts can often be resolved during LTO. We should obviously be unrolling small loops once those trip counts have been resolved, but we weren't. llvm-svn: 257767
This commit is contained in:
parent
a3d2bfba9e
commit
e02efd6bb1
@ -573,7 +573,12 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
if (EnableLoopInterchange)
|
||||
PM.add(createLoopInterchangePass());
|
||||
|
||||
if (!DisableUnrollLoops)
|
||||
PM.add(createSimpleLoopUnrollPass()); // Unroll small loops
|
||||
PM.add(createLoopVectorizePass(true, LoopVectorize));
|
||||
// The vectorizer may have significantly shortened a loop body; unroll again.
|
||||
if (!DisableUnrollLoops)
|
||||
PM.add(createLoopUnrollPass());
|
||||
|
||||
// Now that we've optimized loops (in particular loop induction variables),
|
||||
// we may have exposed more scalar opportunities. Run parts of the scalar
|
||||
|
Loading…
Reference in New Issue
Block a user