diff options
author | Kazu Hirata <kazu@google.com> | 2024-07-28 22:08:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-28 22:08:12 -0700 |
commit | 34d48279b8161d2510fff9e94e10c9508d5249f8 (patch) | |
tree | b40338d8453b7ce72dfa3fd61c8b179eabc2edbd /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | |
parent | dfdef2cbf738dd1cae99fb521d49086fcbbaf19a (diff) | |
download | llvm-34d48279b8161d2510fff9e94e10c9508d5249f8.zip llvm-34d48279b8161d2510fff9e94e10c9508d5249f8.tar.gz llvm-34d48279b8161d2510fff9e94e10c9508d5249f8.tar.bz2 |
[llvm] Initialize SmallVector with ranges (NFC) (#100948)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index 0a6ce6a..20d5b26 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -2426,9 +2426,7 @@ bool InstrRefBasedLDV::mlocJoin( // as its predecessors. If a PHI is placed, test to see whether it's now a // redundant PHI that we can eliminate. - SmallVector<const MachineBasicBlock *, 8> BlockOrders; - for (auto *Pred : MBB.predecessors()) - BlockOrders.push_back(Pred); + SmallVector<const MachineBasicBlock *, 8> BlockOrders(MBB.predecessors()); // Visit predecessors in RPOT order. auto Cmp = [&](const MachineBasicBlock *A, const MachineBasicBlock *B) { @@ -3268,9 +3266,7 @@ void InstrRefBasedLDV::buildVLocValueMap( bool InLocsChanged = vlocJoin(*MBB, LiveOutIdx, BlocksToExplore, *LiveIn); - SmallVector<const MachineBasicBlock *, 8> Preds; - for (const auto *Pred : MBB->predecessors()) - Preds.push_back(Pred); + SmallVector<const MachineBasicBlock *, 8> Preds(MBB->predecessors()); // If this block's live-in value is a VPHI, try to pick a machine-value // for it. This makes the machine-value available and propagated |