[llvm] [SandboxVectorizer] Use llvm::erase (NFC) (PR #134018)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 1 19:47:21 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-vectorizers
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/134018.diff
1 Files Affected:
- (modified) llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h (+1-3)
``````````diff
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
index 2af3c6d0ea517..681cf881bce0f 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
@@ -112,9 +112,7 @@ class SchedBundle {
ContainerTy Nodes;
/// Called by the DGNode destructor to avoid accessing freed memory.
- void eraseFromBundle(DGNode *N) {
- Nodes.erase(std::remove(Nodes.begin(), Nodes.end(), N), Nodes.end());
- }
+ void eraseFromBundle(DGNode *N) { llvm::erase(Nodes, N); }
friend void DGNode::setSchedBundle(SchedBundle &); // For eraseFromBunde().
friend DGNode::~DGNode(); // For eraseFromBundle().
``````````
</details>
https://github.com/llvm/llvm-project/pull/134018
More information about the llvm-commits
mailing list