[PATCH] D90837: [BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 5 11:33:40 PST 2020
MaskRay accepted this revision.
MaskRay added a comment.
LGTM.
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:1180
+ // setEdgeProbability().
+ for (unsigned I = 0; true; ++I) {
auto MapI = Probs.find(std::make_pair(BB, I));
----------------
Nit: delete `true`
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:1183
+ if (MapI == Probs.end()) {
+ assert(Probs.find(std::make_pair(BB, I + 1)) == Probs.end() &&
+ "Must be no more successors");
----------------
find -> count == 0
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90837/new/
https://reviews.llvm.org/D90837
More information about the llvm-commits
mailing list