diff options
author | Fangrui Song <maskray@google.com> | 2019-04-11 10:25:41 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-11 10:25:41 +0000 |
commit | 71cce580b91c8333880addb2df9eca09d97d8bc8 (patch) | |
tree | 0299ad2f098e71c3728a521cf7ff6e5d31a34a81 /llvm/lib/Analysis/TargetLibraryInfo.cpp | |
parent | 2050dff996a27b9fdb9b7365fe8659383de0824d (diff) | |
download | bcm5719-llvm-71cce580b91c8333880addb2df9eca09d97d8bc8.tar.gz bcm5719-llvm-71cce580b91c8333880addb2df9eca09d97d8bc8.zip |
Use llvm::lower_bound. NFC
llvm-svn: 358161
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index d8b2af2f98b..10bb4ab17ca 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -1497,9 +1497,8 @@ bool TargetLibraryInfoImpl::isFunctionVectorizable(StringRef funcName) const { if (funcName.empty()) return false; - std::vector<VecDesc>::const_iterator I = std::lower_bound( - VectorDescs.begin(), VectorDescs.end(), funcName, - compareWithScalarFnName); + std::vector<VecDesc>::const_iterator I = + llvm::lower_bound(VectorDescs, funcName, compareWithScalarFnName); return I != VectorDescs.end() && StringRef(I->ScalarFnName) == funcName; } @@ -1508,8 +1507,8 @@ StringRef TargetLibraryInfoImpl::getVectorizedFunction(StringRef F, F = sanitizeFunctionName(F); if (F.empty()) return F; - std::vector<VecDesc>::const_iterator I = std::lower_bound( - VectorDescs.begin(), VectorDescs.end(), F, compareWithScalarFnName); + std::vector<VecDesc>::const_iterator I = + llvm::lower_bound(VectorDescs, F, compareWithScalarFnName); while (I != VectorDescs.end() && StringRef(I->ScalarFnName) == F) { if (I->VectorizationFactor == VF) return I->VectorFnName; @@ -1524,8 +1523,8 @@ StringRef TargetLibraryInfoImpl::getScalarizedFunction(StringRef F, if (F.empty()) return F; - std::vector<VecDesc>::const_iterator I = std::lower_bound( - ScalarDescs.begin(), ScalarDescs.end(), F, compareWithVectorFnName); + std::vector<VecDesc>::const_iterator I = + llvm::lower_bound(ScalarDescs, F, compareWithVectorFnName); if (I == VectorDescs.end() || StringRef(I->VectorFnName) != F) return StringRef(); VF = I->VectorizationFactor; |