summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-12 02:02:06 +0000
committerFangrui Song <maskray@google.com>2019-04-12 02:02:06 +0000
commitcecc4352508928f7ceeeee92fcde2986a5c55535 (patch)
treefd00bcfc8259cefe24787b0c848cedd79ff9137f /llvm/lib/Analysis
parent21375ca136025f2a6dc55418d43630455ca0e98b (diff)
downloadbcm5719-llvm-cecc4352508928f7ceeeee92fcde2986a5c55535.tar.gz
bcm5719-llvm-cecc4352508928f7ceeeee92fcde2986a5c55535.zip
Use llvm::lower_bound. NFC
This reapplies rL358161. That commit inadvertently reverted an exegesis file to an old version. llvm-svn: 358246
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/TargetLibraryInfo.cpp13
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;
OpenPOWER on IntegriCloud