[PATCH] D79396: [BrachProbablityInfo] Set edge probabilities at once. NFC.
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 09:40:15 PDT 2020
yamauchi added inline comments.
================
Comment at: llvm/include/llvm/Analysis/BranchProbabilityInfo.h:134
+public:
+ void setEdgeProbability(const BasicBlock *Src,
+ const SmallVectorImpl<BranchProbability> &Probs);
----------------
Can you add a short general comment for this public setEdgeProbability?
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:985-986
+ }
+ assert(TotalNumerator <= BranchProbability::getDenominator() + Probs.size());
+ assert(TotalNumerator >= BranchProbability::getDenominator() - Probs.size());
+}
----------------
Looks like simply checking "TotalNumerator == BranchProbability::getDenominator()" won't work probably because of rounding errors. Can you add a brief comment?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79396/new/
https://reviews.llvm.org/D79396
More information about the llvm-commits
mailing list