- SmallVector<SlotIndex, 16> Todo;
- Todo.push_back(Idx);
- do {
- SlotIndex Start = Todo.pop_back_val();
- MachineBasicBlock *MBB = LIS.getMBBFromIndex(Start);
- SlotIndex Stop = LIS.getMBBEndIdx(MBB);
- LocMap::iterator I = locInts.find(Start);
-
- // Limit to VNI's live range.
- bool ToEnd = true;
- if (LR && VNI) {
- LiveInterval::Segment *Segment = LR->getSegmentContaining(Start);
- if (!Segment || Segment->valno != VNI) {
- if (Kills)
- Kills->push_back(Start);
- continue;
- }
- if (Segment->end < Stop)
- Stop = Segment->end, ToEnd = false;
- }
-
- // There could already be a short def at Start.
- if (I.valid() && I.start() <= Start) {
- // Stop when meeting a different location or an already extended interval.
- Start = Start.getNextSlot();
- if (I.value() != LocNo || I.stop() != Start)
- continue;
- // This is a one-slot placeholder. Just skip it.
- ++I;
+ SlotIndex Start = Idx;
+ MachineBasicBlock *MBB = LIS.getMBBFromIndex(Start);
+ SlotIndex Stop = LIS.getMBBEndIdx(MBB);
+ LocMap::iterator I = locInts.find(Start);
+
+ // Limit to VNI's live range.
+ bool ToEnd = true;
+ if (LR && VNI) {
+ LiveInterval::Segment *Segment = LR->getSegmentContaining(Start);
+ if (!Segment || Segment->valno != VNI) {
+ if (Kills)
+ Kills->push_back(Start);
+ return;