Add CFG Simplification pass after Loop Unswitching.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Thu, 24 Sep 2015 03:50:17 +0000 (03:50 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Thu, 24 Sep 2015 03:50:17 +0000 (03:50 +0000)
commitb084468f7e6674cc44489489af11f0a759d7377e
treee3d3c65041404dc98adbe485a3d89a147cec06ce
parentb7afd4e7e9744d83da95cafbaaf7530723029784
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248460 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/PassManagerBuilder.cpp