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)
commita23e5f7516cabf2fc42148687cebf454ba3f5388
tree6979e72a6cd26d39f3807f1c01987e6d02bf7f46
parentab361efee7c5641cd214cf64d0f3ef3c48ba21b8
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.

llvm-svn: 256202
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
llvm/test/CodeGen/Mips/eh.ll
llvm/test/CodeGen/Mips/insn-zero-size-bb.ll
llvm/test/CodeGen/X86/catchret-empty-fallthrough.ll