aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.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/LiveDebugValues/InstrRefBasedImpl.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/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index b9da975..fb688a2 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -918,7 +918,7 @@ public:
// Move set of active variables from one location to another.
auto MovingVars = ActiveMLocs[Src];
- ActiveMLocs[Dst].insert(MovingVars.begin(), MovingVars.end());
+ ActiveMLocs[Dst].insert_range(MovingVars);
VarLocs[Dst.asU64()] = VarLocs[Src.asU64()];
// For each variable based on Src; create a location at Dst.
@@ -2581,7 +2581,7 @@ void InstrRefBasedLDV::placeMLocPHIs(
continue;
}
- RegUnitsToPHIUp.insert(FoundRegUnits.begin(), FoundRegUnits.end());
+ RegUnitsToPHIUp.insert_range(FoundRegUnits);
}
// Lambda to fetch PHIs for a given location, and write into the PHIBlocks
@@ -3087,7 +3087,7 @@ void InstrRefBasedLDV::getBlocksForScope(
// VarLoc LiveDebugValues tracks variable locations that are defined in
// blocks not in scope. This is something we could legitimately ignore, but
// lets allow it for now for the sake of coverage.
- BlocksToExplore.insert(AssignBlocks.begin(), AssignBlocks.end());
+ BlocksToExplore.insert_range(AssignBlocks);
// Storage for artificial blocks we intend to add to BlocksToExplore.
DenseSet<const MachineBasicBlock *> ToAdd;
@@ -3137,7 +3137,7 @@ void InstrRefBasedLDV::getBlocksForScope(
}
};
- BlocksToExplore.insert(ToAdd.begin(), ToAdd.end());
+ BlocksToExplore.insert_range(ToAdd);
}
void InstrRefBasedLDV::buildVLocValueMap(