summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2014-04-14 16:56:19 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2014-04-14 16:56:19 +0000
commit268c0509a995be8cbfd57b135b585e89350bcc94 (patch)
treef5ddc053eac05ad65005a7003eaa28aaab02b9ec /lib/Bitcode/Reader
parentb79d042e4e676fe73bc7ecfc799b44252e2f14e3 (diff)
downloadllvm-268c0509a995be8cbfd57b135b585e89350bcc94.tar.gz
llvm-268c0509a995be8cbfd57b135b585e89350bcc94.tar.bz2
llvm-268c0509a995be8cbfd57b135b585e89350bcc94.tar.xz
Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of basic blocks inside loops correctly.
Previously, BranchProbabilityInfo::calcLoopBranchHeuristics would determine the weights of basic blocks inside loops even when it didn't have enough information to estimate the branch probabilities correctly. This patch fixes the function to exit early if it doesn't see any exit edges or back edges and let the later heuristics determine the weights. This fixes PR18705 and <rdar://problem/15991090>. Differential Revision: http://reviews.llvm.org/D3363 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
0 files changed, 0 insertions, 0 deletions