[llvm] ebc90d5 - [SandboxVectorizer] Use llvm::find (NFC) (#143724)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 12:50:07 PDT 2025
Author: Kazu Hirata
Date: 2025-06-11T12:50:03-07:00
New Revision: ebc90d50b88a7c46634ea21e40ddb25c679ac874
URL: https://github.com/llvm/llvm-project/commit/ebc90d50b88a7c46634ea21e40ddb25c679ac874
DIFF: https://github.com/llvm/llvm-project/commit/ebc90d50b88a7c46634ea21e40ddb25c679ac874.diff
LOG: [SandboxVectorizer] Use llvm::find (NFC) (#143724)
llvm::find allows us to pass a range.
Added:
Modified:
llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
index d4cb34647cf55..6d2144b14bb00 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
@@ -68,7 +68,7 @@ class SeedBundle {
/// the seeds in a bundle. This allows constant time evaluation
/// and "removal" from the list.
void setUsed(Instruction *I) {
- auto It = std::find(begin(), end(), I);
+ auto It = llvm::find(*this, I);
assert(It != end() && "Instruction not in the bundle!");
auto Idx = It - begin();
setUsed(Idx, 1, /*VerifyUnused=*/false);
More information about the llvm-commits
mailing list