[llvm] [InstrRef][nfc] Remove usage of unique_ptrs of arrays (PR #74203)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 11:07:24 PST 2023
================
@@ -3503,7 +3504,10 @@ bool InstrRefBasedLDV::depthFirstVLocAndEmit(
// Helper lambda for ejecting a block -- if nothing is going to use the block,
// we can translate the variable location information into DBG_VALUEs and then
// free all of InstrRefBasedLDV's data structures.
+ SmallPtrSet<const MachineBasicBlock *, 8> EjectedBBs;
auto EjectBlock = [&](MachineBasicBlock &MBB) -> void {
+ if (EjectedBBs.insert(&MBB).second == false)
+ return;
----------------
jmorse wrote:
Makes perfect sense and you're correct; I'm just second-guessing whether the check had a different purpose, or was something I'd gratuitously added in the past without reason.
https://github.com/llvm/llvm-project/pull/74203
More information about the llvm-commits
mailing list