aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-03-22 08:07:33 -0700
committerGitHub <noreply@github.com>2025-03-22 08:07:33 -0700
commit1b189cab5e582a183f6946dcb3e20913add58476 (patch)
treef40249289c962f21a62b4c87bbcc67918fe0573c /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentc6c394634c46156313cfbcaf87678f25e0245dbe (diff)
downloadllvm-1b189cab5e582a183f6946dcb3e20913add58476.zip
llvm-1b189cab5e582a183f6946dcb3e20913add58476.tar.gz
llvm-1b189cab5e582a183f6946dcb3e20913add58476.tar.bz2
[llvm] Use *Set::insert_range (NFC) (#132509)
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch uses insert_range in conjunction with llvm::{predecessors,successors} and MachineBasicBlock::{predecessors,successors}.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 1a791f0..2d34c8e 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -1082,7 +1082,7 @@ bool CodeGenPrepare::canMergeBlocks(const BasicBlock *BB,
for (unsigned i = 0, e = BBPN->getNumIncomingValues(); i != e; ++i)
BBPreds.insert(BBPN->getIncomingBlock(i));
} else {
- BBPreds.insert(pred_begin(BB), pred_end(BB));
+ BBPreds.insert_range(predecessors(BB));
}
// Walk the preds of DestBB.