// Compute current resource length
- ArrayRef<const MachineBasicBlock *> MBBarr(MBB);
+ //ArrayRef<const MachineBasicBlock *> MBBarr(MBB);
+ SmallVector <const MachineBasicBlock *, 1> MBBarr;
+ MBBarr.push_back(MBB);
unsigned ResLenBeforeCombine = BlockTrace.getResourceLength(MBBarr);
// Deal with SC rather than Instructions.
MBB->insert((MachineBasicBlock::iterator) & MI,
(MachineInstr *)InstrPtr);
for (auto *InstrPtr : DelInstrs)
- InstrPtr->eraseFromParent();
+ InstrPtr->eraseFromParentAndMarkDBGValuesForRemoval();
Changed = true;
++NumInstCombined;