[llvm] r278474 - Use the range variant of count_if instead of unpacking begin/end
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 21:32:29 PDT 2016
Author: majnemer
Date: Thu Aug 11 23:32:29 2016
New Revision: 278474
URL: http://llvm.org/viewvc/llvm-project?rev=278474&view=rev
Log:
Use the range variant of count_if instead of unpacking begin/end
No functionality change is intended.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=278474&r1=278473&r2=278474&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Thu Aug 11 23:32:29 2016
@@ -1857,7 +1857,7 @@ ARMTargetLowering::LowerCall(TargetLower
auto *BB = CLI.CS->getParent();
bool PreferIndirect =
Subtarget->isThumb() && MF.getFunction()->optForMinSize() &&
- std::count_if(GV->user_begin(), GV->user_end(), [&BB](const User *U) {
+ count_if(GV->users(), [&BB](const User *U) {
return isa<Instruction>(U) && cast<Instruction>(U)->getParent() == BB;
}) > 2;
More information about the llvm-commits
mailing list