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