diff options
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 |