[BrachProbablityInfo] Set edge probabilities at once. NFC.
authorYevgeny Rouban <yrouban@azul.com>
Wed, 13 May 2020 05:14:06 +0000 (12:14 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Wed, 13 May 2020 06:55:36 +0000 (13:55 +0700)
commiteef95f2746c3347b8dad19091ffb82a88d73acd3
tree1cfe80ba7891ad6a274298d6c5753d934da4e324
parentad60ff70eb56a7d198e613152f9974d5d4baabd4
[BrachProbablityInfo] Set edge probabilities at once. NFC.

Hide the method that allows setting probability for particular
edge and introduce a public method that sets probabilities for
all outgoing edges at once.
Setting individual edge probability is error prone. More over
it is difficult to check that the total probability is 1.0
because there is no easy way to know when the user finished
setting all the probabilities.

Reviewers: yamauchi, ebrevnov
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79396
llvm/include/llvm/Analysis/BranchProbabilityInfo.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp