Restore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks both
authorDan Gohman <gohman@apple.com>
Tue, 20 Oct 2009 20:06:09 +0000 (20:06 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 20 Oct 2009 20:06:09 +0000 (20:06 +0000)
commitcd53f64367b3d9e2b1a82e589d09682a42f538ea
tree157cc9455538890776bbdb86363c61ce601922be
parent480c529e026942f28e1a792d2cec6d6b5bc0edba
Restore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks both
the estimated code size and the number of blocks when deciding whether to
do a non-trivial unswitch. This protects it from some very undesirable
worst-case behavior on large numbers of loop-unswitchable conditions, such
as in the testcase in PR5259.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84661 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnswitch.cpp