Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
authorJun Bum Lim <junbuml@codeaurora.org>
Fri, 18 Dec 2015 20:53:47 +0000 (20:53 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Fri, 18 Dec 2015 20:53:47 +0000 (20:53 +0000)
commitec63ff81dd85fcb1731ccfb07980a259cc974ee8
tree1284e82ce581e3becc26d5d99b9e996d292098e6
parent311fb07b3bb96292c8d0cc2d0d49576e1321e420
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst

When identifying blocks post-dominated by an unreachable-terminated block
in BranchProbabilityInfo, consider only the edge to the normal destination
block if the terminator is InvokeInst and let calcInvokeHeuristics() decide
edge weights for the InvokeInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256028 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BranchProbabilityInfo.cpp
test/Analysis/BranchProbabilityInfo/noreturn.ll
test/CodeGen/X86/catchret-empty-fallthrough.ll