Add a proper if-conversion cost model.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 10 Aug 2012 22:27:31 +0000 (22:27 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 10 Aug 2012 22:27:31 +0000 (22:27 +0000)
commiteb74c08192d9c9425b2d8cf08852e9e787a87881
treee5007e103e21049e14735964ea7fb9618fd2dd68
parenta35bf506f41f4231dc649f3af5255e0b1087b2e3
Add a proper if-conversion cost model.

Detect when there is not enough available ILP, so if-conversion can't
speculate instructions for free.

Compute the lengthening of the critical path when inserting a select
instruction that depends on the condition as well as both sides of the
if.

Reject conversions that would stretch the critical path by more than
half a mispredict penalty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161713 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/EarlyIfConversion.cpp