Skip to content

Commit

Permalink
[BranchProbabilityInfo] Use succ_size (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Nov 6, 2020
1 parent 16dccf7 commit 30929d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Analysis/BranchProbabilityInfo.cpp
Expand Up @@ -1126,8 +1126,7 @@ BranchProbabilityInfo::getEdgeProbability(const BasicBlock *Src,
Prob += MapI->second;
}
}
uint32_t succ_num = std::distance(succ_begin(Src), succ_end(Src));
return FoundProb ? Prob : BranchProbability(EdgeCount, succ_num);
return FoundProb ? Prob : BranchProbability(EdgeCount, succ_size(Src));
}

/// Set the edge probability for all edges at once.
Expand Down

0 comments on commit 30929d1

Please sign in to comment.