diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 03:55:06 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 03:55:06 +0000 |
commit | 42531260b3e0cc6256bd64911fc3db7aea59a68e (patch) | |
tree | bb5d1b3e84331a2673079b42a25135d177d5f8e4 /llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp | |
parent | 1a2cb97f7b6b0a3ad14c7f076b10a1a19834fac7 (diff) | |
download | bcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.tar.gz bcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.zip |
Use the range variant of find/find_if instead of unpacking begin/end
If the result of the find is only used to compare against end(), just
use is_contained instead.
No functionality change is intended.
llvm-svn: 278469
Diffstat (limited to 'llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp index fe734061837..21eff9dfff9 100644 --- a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp +++ b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp @@ -50,8 +50,7 @@ BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const { // This is a linear search. Try to use the const_succ_iterator version when // possible. - return getEdgeProbability(Src, - std::find(Src->succ_begin(), Src->succ_end(), Dst)); + return getEdgeProbability(Src, find(Src->successors(), Dst)); } bool MachineBranchProbabilityInfo::isEdgeHot( |