Lines Matching refs:ReadI
1111 // 2. [ReadI; end) at the back of LR.
1114 // - LR.begin() <= WriteI <= ReadI <= LR.end().
1137 OS << " updater with gap = " << (ReadI - WriteI)
1146 for (const auto &S : make_range(ReadI, LR->end()))
1184 WriteI = ReadI = LR->begin();
1190 // Advance ReadI until it ends after Seg.start.
1192 if (ReadI != E && ReadI->end <= Seg.start) {
1193 // First try to close the gap between WriteI and ReadI with spills.
1194 if (ReadI != WriteI)
1196 // Then advance ReadI.
1197 if (ReadI == WriteI)
1198 ReadI = WriteI = LR->find(Seg.start);
1200 while (ReadI != E && ReadI->end <= Seg.start)
1201 *WriteI++ = *ReadI++;
1204 assert(ReadI == E || ReadI->end > Seg.start);
1206 // Check if the ReadI segment begins early.
1207 if (ReadI != E && ReadI->start <= Seg.start) {
1208 assert(ReadI->valno == Seg.valno && "Cannot overlap different values");
1209 // Bail if Seg is completely contained in ReadI.
1210 if (ReadI->end >= Seg.end)
1213 Seg.start = ReadI->start;
1214 ++ReadI;
1217 // Coalesce as much as possible from ReadI into Seg.
1218 while (ReadI != E && coalescable(Seg, *ReadI)) {
1219 Seg.end = std::max(Seg.end, ReadI->end);
1220 ++ReadI;
1237 if (WriteI != ReadI) {
1245 WriteI = ReadI = LR->end();
1251 // and ReadI. Advance WriteI to reflect the inserted instructions.
1254 size_t GapSize = ReadI - WriteI;
1285 LR->segments.erase(WriteI, ReadI);
1290 // Resize the WriteI - ReadI gap to match Spills.
1291 size_t GapSize = ReadI - WriteI;
1295 LR->segments.insert(ReadI, Spills.size() - GapSize, LiveRange::Segment());
1296 // This also invalidated ReadI, but it is recomputed below.
1300 LR->segments.erase(WriteI + Spills.size(), ReadI);
1302 ReadI = WriteI + Spills.size();