[llvm] [AArch64] Use llvm::erase_if (NFC) (PR #133647)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 30 11:22:52 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133647
None
>From 11825a28f6de5d339cd0018d0296ed5cb0ee2811 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 30 Mar 2025 01:07:10 -0700
Subject: [PATCH] [AArch64] Use llvm::erase_if (NFC)
---
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index 1761f58faf0fe..6bf6ce7167833 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -5552,12 +5552,9 @@ void AArch64FrameLowering::emitRemarks(
return;
llvm::sort(StackAccesses);
- StackAccesses.erase(llvm::remove_if(StackAccesses,
- [](const StackAccess &S) {
- return S.AccessTypes ==
- StackAccess::NotAccessed;
- }),
- StackAccesses.end());
+ llvm::erase_if(StackAccesses, [](const StackAccess &S) {
+ return S.AccessTypes == StackAccess::NotAccessed;
+ });
SmallVector<const StackAccess *> MixedObjects;
SmallVector<std::pair<const StackAccess *, const StackAccess *>> HazardPairs;
More information about the llvm-commits
mailing list