Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
authorJun Bum Lim <junbuml@codeaurora.org>
Mon, 21 Dec 2015 22:00:51 +0000 (22:00 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Mon, 21 Dec 2015 22:00:51 +0000 (22:00 +0000)
commite7f0062250d0fb97a6e685f729859bb031fe67b1
treeb0a48b230edc4d9c0c7136938a8b2c5ab711cbf5
parentaf14cd0f4bbe33d7d9e60179462046410aba39b1
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst

This is recommit of r256028 with minor fixes in unittests:
  CodeGen/Mips/eh.ll
  CodeGen/Mips/insn-zero-size-bb.ll

Original commit message:

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@256202 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BranchProbabilityInfo.cpp
test/Analysis/BranchProbabilityInfo/noreturn.ll
test/CodeGen/Mips/eh.ll
test/CodeGen/Mips/insn-zero-size-bb.ll
test/CodeGen/X86/catchret-empty-fallthrough.ll