aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-03-20 22:24:06 -0700
committerGitHub <noreply@github.com>2025-03-20 22:24:06 -0700
commit599005686a1c27ffe97bb4eb07fcd98359a2af99 (patch)
tree044944abd13d5134772d7507fef23ac7a6a52a21 /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent13bb2f450ef9f64f393fe5527e5ac68362af8ccd (diff)
downloadllvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.zip
llvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.tar.gz
llvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.tar.bz2
[llvm] Use *Set::insert_range (NFC) (#132325)
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch replaces: Dest.insert(Src.begin(), Src.end()); with: Dest.insert_range(Src); This patch does not touch custom begin like succ_begin for now.
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCopyPropagation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
index 5102639..ff75b87 100644
--- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp
+++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
@@ -173,8 +173,8 @@ public:
auto Dest = TRI.regunits(CopyOperands->Destination->getReg().asMCReg());
auto Src = TRI.regunits(CopyOperands->Source->getReg().asMCReg());
- RegUnitsToInvalidate.insert(Dest.begin(), Dest.end());
- RegUnitsToInvalidate.insert(Src.begin(), Src.end());
+ RegUnitsToInvalidate.insert_range(Dest);
+ RegUnitsToInvalidate.insert_range(Src);
};
for (MCRegUnit Unit : TRI.regunits(Reg)) {