forked from OSchip/llvm-project
[MachineSink] Construct SmallVector with iterator ranges (NFC)
This commit is contained in:
parent
441650d589
commit
cea1c63756
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue