OSDN Git Service

Generalize the reading of probability metadata to work for both branches
authorChandler Carruth <chandlerc@gmail.com>
Wed, 19 Oct 2011 10:32:19 +0000 (10:32 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 19 Oct 2011 10:32:19 +0000 (10:32 +0000)
commit941aa7b1e8c1b77544d643e8b23ff07f7f83f281
tree651ee5eb067c9eb0e6cfc0c43d3a2762c4fdb1ef
parent99d01c54a0fd790a48d5aa02bfeb4cc08388b8fa
Generalize the reading of probability metadata to work for both branches
and switches, with arbitrary numbers of successors. Still optimized for
the common case of 2 successors for a conditional branch.

Add a test case for switch metadata showing up in the BlockFrequencyInfo pass.

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