Lines Matching full:entries
280 // Fast path: we can just add entries to the end. in addEntry()
281 if (Entries.empty() || Entries.back().End <= begin) { in addEntry()
282 Entries.push_back({begin, end, type}); in addEntry()
287 // TODO: do a binary search if Entries is big enough for it to matter. in addEntry()
288 size_t index = Entries.size() - 1; in addEntry()
290 if (Entries[index - 1].End <= begin) break; in addEntry()
296 if (Entries[index].Begin >= end) { in addEntry()
300 Entries.insert(Entries.begin() + index, {begin, end, type}); in addEntry()
309 if (Entries[index].Begin == begin && Entries[index].End == end) { in addEntry()
311 if (Entries[index].Type == type) return; in addEntry()
314 if (Entries[index].Type == nullptr) { in addEntry()
317 Entries[index].Type = nullptr; in addEntry()
323 if (auto entryType = getCommonType(Entries[index].Type, type)) { in addEntry()
324 Entries[index].Type = entryType; in addEntry()
329 Entries[index].Type = nullptr; in addEntry()
352 if (Entries[index].Type && Entries[index].Type->isVectorTy()) { in addEntry()
359 Entries[index].Type = nullptr; in addEntry()
362 if (begin < Entries[index].Begin) { in addEntry()
363 Entries[index].Begin = begin; in addEntry()
364 assert(index == 0 || begin >= Entries[index - 1].End); in addEntry()
369 while (end > Entries[index].End) { in addEntry()
370 assert(Entries[index].Type == nullptr); in addEntry()
373 if (index == Entries.size() - 1 || end <= Entries[index + 1].Begin) { in addEntry()
374 Entries[index].End = end; in addEntry()
379 Entries[index].End = Entries[index + 1].Begin; in addEntry()
385 if (Entries[index].Type == nullptr) in addEntry()
388 // Split vector entries unless we completely subsume them. in addEntry()
389 if (Entries[index].Type->isVectorTy() && in addEntry()
390 end < Entries[index].End) { in addEntry()
395 Entries[index].Type = nullptr; in addEntry()
402 auto vecTy = cast<llvm::VectorType>(Entries[index].Type); in splitVectorEntry()
403 auto split = splitLegalVectorType(CGM, Entries[index].getWidth(), vecTy); in splitVectorEntry()
408 Entries.insert(Entries.begin() + index + 1, numElts - 1, StorageEntry()); in splitVectorEntry()
410 CharUnits begin = Entries[index].Begin; in splitVectorEntry()
413 Entries[idx].Type = eltTy; in splitVectorEntry()
414 Entries[idx].Begin = begin; in splitVectorEntry()
415 Entries[idx].End = begin + eltSize; in splitVectorEntry()
459 // Only merge entries that overlap the same chunk. We test this first in shouldMergeEntries()
471 if (Entries.empty()) { in finish()
480 // First pass: if two entries should be merged, make them both opaque in finish()
482 // Also, remember if there are any opaque entries. in finish()
483 bool hasOpaqueEntries = (Entries[0].Type == nullptr); in finish()
484 for (size_t i = 1, e = Entries.size(); i != e; ++i) { in finish()
485 if (shouldMergeEntries(Entries[i - 1], Entries[i], chunkSize)) { in finish()
486 Entries[i - 1].Type = nullptr; in finish()
487 Entries[i].Type = nullptr; in finish()
488 Entries[i - 1].End = Entries[i].Begin; in finish()
491 } else if (Entries[i].Type == nullptr) { in finish()
496 // The rest of the algorithm leaves non-opaque entries alone, so if we in finish()
497 // have no opaque entries, we're done. in finish()
503 // Okay, move the entries to a temporary and rebuild Entries. in finish()
504 auto orig = std::move(Entries); in finish()
505 assert(Entries.empty()); in finish()
508 // Just copy over non-opaque entries. in finish()
510 Entries.push_back(orig[i]); in finish()
550 Entries.push_back({unitBegin, unitEnd, entryTy}); in finish()
564 for (auto &entry : Entries) { in enumerateComponents()
575 if (Entries.empty()) { in getCoerceAndExpandTypes()
584 for (auto &entry : Entries) { in getCoerceAndExpandTypes()
612 for (auto &entry : Entries) { in getCoerceAndExpandTypes()
620 } else if (Entries.size() == 1) { in getCoerceAndExpandTypes()
621 unpaddedType = Entries[0].Type; in getCoerceAndExpandTypes()
631 if (Entries.empty()) return false; in shouldPassIndirectly()
634 if (Entries.size() == 1) { in shouldPassIndirectly()
635 return getSwiftABIInfo(CGM).shouldPassIndirectly(Entries.back().Type, in shouldPassIndirectly()
640 componentTys.reserve(Entries.size()); in shouldPassIndirectly()
641 for (auto &entry : Entries) { in shouldPassIndirectly()