aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-01-05 21:15:57 -0800
committerKazu Hirata <kazu@google.com>2021-01-05 21:15:57 -0800
commitcea1c63756f92f29595251943262b73f7f290f45 (patch)
tree4ae382a56ab5bc9f0ec41a143498e17847d3e4cc
parent441650d5893001f18a0bb9440ea32f6bd2039196 (diff)
downloadllvm-cea1c63756f92f29595251943262b73f7f290f45.zip
llvm-cea1c63756f92f29595251943262b73f7f290f45.tar.gz
llvm-cea1c63756f92f29595251943262b73f7f290f45.tar.bz2
[MachineSink] Construct SmallVector with iterator ranges (NFC)
-rw-r--r--llvm/lib/CodeGen/MachineSink.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index 42ab961..cede18b 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -1588,7 +1588,6 @@ bool PostRAMachineSinking::tryToSinkCopy(MachineBasicBlock &CurBB,
// recorded which reg units that DBG_VALUEs read, if this instruction
// writes any of those units then the corresponding DBG_VALUEs must sink.
SetVector<MachineInstr *> DbgValsToSinkSet;
- SmallVector<MachineInstr *, 4> DbgValsToSink;
for (auto &MO : MI->operands()) {
if (!MO.isReg() || !MO.isDef())
continue;
@@ -1598,8 +1597,8 @@ bool PostRAMachineSinking::tryToSinkCopy(MachineBasicBlock &CurBB,
for (auto *MI : SeenDbgInstrs.lookup(Reg))
DbgValsToSinkSet.insert(MI);
}
- DbgValsToSink.insert(DbgValsToSink.begin(), DbgValsToSinkSet.begin(),
- DbgValsToSinkSet.end());
+ SmallVector<MachineInstr *, 4> DbgValsToSink(DbgValsToSinkSet.begin(),
+ DbgValsToSinkSet.end());
// Clear the kill flag if SrcReg is killed between MI and the end of the
// block.