Lines Matching defs:VI

392   bool shouldImportGlobal(const ValueInfo &VI) {
393 const auto &GVS = DefinedGVSummaries.find(VI.getGUID());
406 if (VI.getSummaryList().size() > 1 &&
408 !IsPrevailing(VI.getGUID(), GVS->second))
417 for (const auto &VI : Summary.refs()) {
418 if (!shouldImportGlobal(VI)) {
424 LLVM_DEBUG(dbgs() << " ref -> " << VI << "\n");
426 for (const auto &RefSummary : VI.getSummaryList()) {
435 shouldSkipLocalInAnotherModule(GVS, VI.getSummaryList().size(),
441 VI.getGUID());
448 if (ImportList.addDefinition(RefSummary->modulePath(), VI.getGUID()) !=
459 (*ExportLists)[RefSummary->modulePath()].insert(VI);
552 for (auto &VI : llvm::make_early_inc_range(ValueInfos)) {
553 auto It = DefinedGVSummaries.find(VI.getGUID());
555 IsPrevailing(VI.getGUID(), It->second)) {
557 dbgs() << "[Workload] " << VI.name()
563 qualifyCalleeCandidates(Index, VI.getSummaryList(), ModName);
570 LLVM_DEBUG(dbgs() << "[Workflow] Candidate for " << VI.name()
579 LLVM_DEBUG(dbgs() << "[Workload] Not importing " << VI.name()
581 << Function::getGUID(VI.name()) << "\n");
600 return IsPrevailing(VI.getGUID(), Candidate);
609 << VI.name()
628 LLVM_DEBUG(dbgs() << "[Workload] Not importing " << VI.name()
633 LLVM_DEBUG(dbgs() << "[Workload][Including]" << VI.name() << " from "
635 << Function::getGUID(VI.name()) << "\n");
636 ImportList.addDefinition(ExportingModule, VI.getGUID());
639 (*ExportLists)[ExportingModule].insert(VI);
650 ValueInfo VI = Index.getValueInfo(I);
651 if (!NameToValueInfo.insert(std::make_pair(VI.name(), VI)).second)
652 LLVM_DEBUG(AmbiguousNames.insert(VI.name()));
758 if (auto VI = Index.getValueInfo(Guid))
759 Set.insert(VI);
783 for (const auto &VI : Set) {
785 << " Would include: " << VI.getGUID() << "\n";
845 ValueInfo VI = Edge.first;
846 LLVM_DEBUG(dbgs() << " edge -> " << VI << " Threshold:" << Threshold
855 if (DefinedGVSummaries.count(VI.getGUID())) {
877 VI.getGUID(), std::make_tuple(NewThreshold, nullptr, nullptr)));
924 selectCallee(Index, VI.getSummaryList(), NewThreshold,
934 ImportList.maybeAddDeclaration(DeclSourceModule, VI.getGUID());
953 VI, Edge.second.getHotness(), Reason, 1);
957 VI.name().str() + " due to " +
983 if (ImportList.addDefinition(ExportModulePath, VI.getGUID()) !=
996 (*ExportLists)[ExportModulePath].insert(VI);
1033 auto VI = Index.getValueInfo(GVSummary.first);
1036 LLVM_DEBUG(dbgs() << "Ignores Dead GUID: " << VI << "\n");
1044 LLVM_DEBUG(dbgs() << "Initialize import for " << VI << "\n");
1074 if (!FailureInfo->VI.getSummaryList().empty())
1076 FailureInfo->VI.getSummaryList()[0]->getBaseObject());
1077 dbgs() << FailureInfo->VI
1088 static bool isGlobalVarSummary(const ModuleSummaryIndex &Index, ValueInfo VI) {
1089 auto SL = VI.getSummaryList();
1097 if (const auto &VI = Index.getValueInfo(G))
1098 return isGlobalVarSummary(Index, VI);
1107 for (auto &VI : ExportSet)
1108 if (isGlobalVarSummary(Index, VI.getGUID()))
1155 const ValueInfo &VI) {
1157 Index.findSummaryInModule(VI, ModulePath));
1165 for (auto &VI : ExportPerModule.second)
1166 if (!FlattenedImports.count(VI.getGUID()) &&
1167 IsReadOrWriteOnlyVarNeedingImporting(ExportPerModule.first, VI))
1198 // `NewExports` tracks the VI that gets exported because the full definition
1222 for (const auto &VI : GVS->refs())
1223 NewExports.insert(VI);
1363 auto VI = Index.getValueInfo(GUID);
1365 VI.getSummaryList(),
1380 EI.first = VI;
1409 ValueInfo VI = Index.getValueInfo(GUID);
1410 if (!VI)
1412 for (const auto &S : VI.getSummaryList())
1418 auto VI = Index.getValueInfo(Entry);
1423 LLVM_DEBUG(dbgs() << "Live root: " << VI << "\n");
1424 Worklist.push_back(VI);
1432 auto visit = [&](ValueInfo VI, bool IsAliasee) {
1442 if (llvm::any_of(VI.getSummaryList(),
1453 if (isPrevailing(VI.getGUID()) == PrevailingType::No) {
1456 for (const auto &S : VI.getSummaryList()) {
1476 for (const auto &S : VI.getSummaryList())
1479 Worklist.push_back(VI);
1483 auto VI = Worklist.pop_back_val();
1484 for (const auto &Summary : VI.getSummaryList()) {
1486 // If this is an alias, visit the aliasee VI to ensure that all copies