[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 16:20:54 PDT 2024


================
@@ -1827,15 +1831,13 @@ Expected<bool> FunctionImporter::importFunctions(
     if (Error Err = SrcModule->materializeMetadata())
       return std::move(Err);
 
-    auto &ImportGUIDs = FunctionsToImportPerModule->second;
-
     // Find the globals to import
     SetVector<GlobalValue *> GlobalsToImport;
     for (Function &F : *SrcModule) {
       if (!F.hasName())
         continue;
       auto GUID = F.getGUID();
-      auto MaybeImportType = ImportList.getImportType(ImportGUIDs, GUID);
+      auto MaybeImportType = ImportList.getImportType(Name, GUID);
----------------
kazutakahirata wrote:

Fixed in the latest iteration.

https://github.com/llvm/llvm-project/pull/106772


More information about the cfe-commits mailing list