mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 12:33:33 +02:00
Add CFG Simplification pass after Loop Unswitching.
Loop unswitching produces conditional branches with constant condition, and it's beneficial for later passes to clean this up with simplify-cfg. We do this after the second invocation of loop-unswitch, but not after the first one. Not doing so might cause problem for passes like LoopUnroll, whose estimate of loop body size would be less accurate. Reviewers: hfinkel Differential Revision: http://reviews.llvm.org/D13064 llvm-svn: 248460
This commit is contained in:
parent
82c98de471
commit
3efc2c1480
@ -260,6 +260,7 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
|
||||
MPM.add(createLICMPass()); // Hoist loop invariants
|
||||
MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
|
||||
MPM.add(createCFGSimplificationPass());
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
|
||||
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
|
||||
|
Loading…
Reference in New Issue
Block a user