- void moveUseUp(SlotIndex OldIdx, LiveRange& LR, LiveInterval& LI) {
- bool LiveThrough = LR.end > OldIdx.getRegSlot();
- if (LiveThrough)
- return; // If we moving up and live through there's nothing to do.
- SlotIndex LastUseInRange = NewIdx.getRegSlot();
- for (MachineRegisterInfo::use_nodbg_iterator
- UI = MRI.use_nodbg_begin(LI.reg),
- UE = MRI.use_nodbg_end();
- UI != UE; ++UI) {
- const MachineInstr* MI = &*UI;
- const MachineOperand& MO = UI.getOperand();
- SlotIndex InstSlot = LIS.getSlotIndexes()->getInstructionIndex(MI);
- SlotIndex OpSlot = InstSlot.getRegSlot(MO.isEarlyClobber());
- if (OpSlot > LastUseInRange && OpSlot < OldIdx)
- LastUseInRange = OpSlot;
- }
+#ifndef NDEBUG
+ LIValidator validator;
+ std::for_each(Entering.begin(), Entering.end(), validator);
+ std::for_each(Internal.begin(), Internal.end(), validator);
+ std::for_each(Exiting.begin(), Exiting.end(), validator);
+ assert(validator.rangesOk() && "moveOperandsFrom broke liveness.");
+#endif