Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Entries

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