[BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC
authorYevgeny Rouban <yrouban@azul.com>
Fri, 6 Nov 2020 05:16:19 +0000 (12:16 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Fri, 6 Nov 2020 05:21:24 +0000 (12:21 +0700)
commit4931158d27dcf1842b12d49f56ed5dede9c292fd
tree1913088bc4f1f13c4c50e09d071ba7bf083bb551
parent2af37cf7ffc43daa9523f209050761039c29964b
[BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC

This refactoring allows to eliminate the MaxSuccIdx map
proposed in the commit a7b662d0.
The idea is to remove probabilities for a block BB for
all its successors one by one from first, second, ...
till N-th until they are defined in Probs. This works
because probabilities for the block are set at once for
all its successors from number 0 to N-1 and the rest
are removed if there were stale probs.
The protected method setEdgeProbability(), which set
probabilities for individual successor, is removed.
This makes it clear that the probabilities are set in
bulk by the public method with the same name.

Reviewed By: kazu, MaskRay

Differential Revision: https://reviews.llvm.org/D90837
llvm/include/llvm/Analysis/BranchProbabilityInfo.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp