Check the case that the numerator and denominator are both zeros when getting edge...
authorCong Hou <congh@google.com>
Mon, 26 Oct 2015 18:00:17 +0000 (18:00 +0000)
committerCong Hou <congh@google.com>
Mon, 26 Oct 2015 18:00:17 +0000 (18:00 +0000)
commit2d382f246b34e9ca6228cf4aedd314570e1f1246
treeba33c45250f8fac45b0a53dbbdbd6ad713bdf87a
parent0cd635f7509d60acd16b8267fa2ed0b47066e0fc
Check the case that the numerator and denominator are both zeros when getting edge probabilities in BPI and return 100% in this case.

This issue is triggered in PGO mode when bootstrapping LLVM. It seems that it is not guaranteed that edge weights are always greater than zero which are read from profile data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251317 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BranchProbabilityInfo.cpp