This patch teaches the BranchProbabilityInfo pass to use metadata encoded probabilities when present on branch instructions. Switch instructions still need to be handled. A step toward resolving the remaining parts of PR2577.<div>
<br></div><div>The tests included in the patch build on my previous patch to support testing BlockFrequencyInfo. If there is concern about testing the functionality on that layer, I can add analysis printing and tests to the underlying BranchProbabilityInfo pass. I may add printing support anyways to aid in debugging.</div>