Lines Matching full:entries

262   // Fast path: we can just add entries to the end.  in addEntry()
263 if (Entries.empty() || Entries.back().End <= begin) { in addEntry()
264 Entries.push_back({begin, end, type}); in addEntry()
269 // TODO: do a binary search if Entries is big enough for it to matter. in addEntry()
270 size_t index = Entries.size() - 1; in addEntry()
272 if (Entries[index - 1].End <= begin) break; in addEntry()
278 if (Entries[index].Begin >= end) { in addEntry()
282 Entries.insert(Entries.begin() + index, {begin, end, type}); in addEntry()
291 if (Entries[index].Begin == begin && Entries[index].End == end) { in addEntry()
293 if (Entries[index].Type == type) return; in addEntry()
296 if (Entries[index].Type == nullptr) { in addEntry()
299 Entries[index].Type = nullptr; in addEntry()
305 if (auto entryType = getCommonType(Entries[index].Type, type)) { in addEntry()
306 Entries[index].Type = entryType; in addEntry()
311 Entries[index].Type = nullptr; in addEntry()
331 if (Entries[index].Type && Entries[index].Type->isVectorTy()) { in addEntry()
338 Entries[index].Type = nullptr; in addEntry()
341 if (begin < Entries[index].Begin) { in addEntry()
342 Entries[index].Begin = begin; in addEntry()
343 assert(index == 0 || begin >= Entries[index - 1].End); in addEntry()
348 while (end > Entries[index].End) { in addEntry()
349 assert(Entries[index].Type == nullptr); in addEntry()
352 if (index == Entries.size() - 1 || end <= Entries[index + 1].Begin) { in addEntry()
353 Entries[index].End = end; in addEntry()
358 Entries[index].End = Entries[index + 1].Begin; in addEntry()
364 if (Entries[index].Type == nullptr) in addEntry()
367 // Split vector entries unless we completely subsume them. in addEntry()
368 if (Entries[index].Type->isVectorTy() && in addEntry()
369 end < Entries[index].End) { in addEntry()
374 Entries[index].Type = nullptr; in addEntry()
381 auto vecTy = cast<llvm::VectorType>(Entries[index].Type); in splitVectorEntry()
382 auto split = splitLegalVectorType(CGM, Entries[index].getWidth(), vecTy); in splitVectorEntry()
387 Entries.insert(&Entries[index + 1], numElts - 1, StorageEntry()); in splitVectorEntry()
389 CharUnits begin = Entries[index].Begin; in splitVectorEntry()
391 Entries[index].Type = eltTy; in splitVectorEntry()
392 Entries[index].Begin = begin; in splitVectorEntry()
393 Entries[index].End = begin + eltSize; in splitVectorEntry()
415 if (Entries.empty()) { in finish()
424 // First pass: if two entries share a chunk, make them both opaque in finish()
426 bool hasOpaqueEntries = (Entries[0].Type == nullptr); in finish()
427 for (size_t i = 1, e = Entries.size(); i != e; ++i) { in finish()
428 if (areBytesInSameUnit(Entries[i - 1].End - CharUnits::One(), in finish()
429 Entries[i].Begin, chunkSize)) { in finish()
430 Entries[i - 1].Type = nullptr; in finish()
431 Entries[i].Type = nullptr; in finish()
432 Entries[i - 1].End = Entries[i].Begin; in finish()
435 } else if (Entries[i].Type == nullptr) { in finish()
440 // The rest of the algorithm leaves non-opaque entries alone, so if we in finish()
441 // have no opaque entries, we're done. in finish()
447 // Okay, move the entries to a temporary and rebuild Entries. in finish()
448 auto orig = std::move(Entries); in finish()
449 assert(Entries.empty()); in finish()
452 // Just copy over non-opaque entries. in finish()
454 Entries.push_back(orig[i]); in finish()
494 Entries.push_back({unitBegin, unitEnd, entryTy}); in finish()
508 for (auto &entry : Entries) { in enumerateComponents()
519 if (Entries.empty()) { in getCoerceAndExpandTypes()
528 for (auto &entry : Entries) { in getCoerceAndExpandTypes()
555 for (auto &entry : Entries) { in getCoerceAndExpandTypes()
563 } else if (Entries.size() == 1) { in getCoerceAndExpandTypes()
564 unpaddedType = Entries[0].Type; in getCoerceAndExpandTypes()
574 if (Entries.empty()) return false; in shouldPassIndirectly()
576 CharUnits totalSize = Entries.back().End; in shouldPassIndirectly()
579 if (Entries.size() == 1) { in shouldPassIndirectly()
581 Entries.back().Type, in shouldPassIndirectly()
586 componentTys.reserve(Entries.size()); in shouldPassIndirectly()
587 for (auto &entry : Entries) { in shouldPassIndirectly()