[PATCH] D156260: [FunctionSpecialization] Use SmallVector::operator== to simplify some code. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 25 14:04:05 PDT 2023
craig.topper created this revision.
craig.topper added a reviewer: labrinea.
Herald added subscribers: hoy, ormris.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156260
Files:
llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
Index: llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
+++ llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
@@ -82,12 +82,9 @@
SmallVector<ArgInfo, 4> Args;
bool operator==(const SpecSig &Other) const {
- if (Key != Other.Key || Args.size() != Other.Args.size())
+ if (Key != Other.Key)
return false;
- for (size_t I = 0; I < Args.size(); ++I)
- if (Args[I] != Other.Args[I])
- return false;
- return true;
+ return Args == Other.Args;
}
friend hash_code hash_value(const SpecSig &S) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156260.544091.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230725/91dc1134/attachment.bin>
More information about the llvm-commits
mailing list