[llvm] [ThinLTO] Use a set rather than a map to track exported ValueInfos. (PR #97360)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 09:44:34 PDT 2024


================
@@ -1154,29 +1147,25 @@ void llvm::ComputeCrossModuleImport(
   for (auto &ModuleImports : ImportLists) {
     auto ModName = ModuleImports.first;
     auto &Exports = ExportLists[ModName];
-    unsigned DefinedGVS = 0, DefinedFS = 0;
-    unsigned NumGVS =
-        numGlobalVarSummaries(Index, Exports, DefinedGVS, DefinedFS);
+    unsigned DefinedFS = 0;
+    unsigned NumGVS = numGlobalVarSummaries(Index, Exports, DefinedFS);
     LLVM_DEBUG(dbgs() << "* Module " << ModName << " exports " << DefinedFS
                       << " function as definitions, "
                       << Exports.size() - NumGVS - DefinedFS
----------------
minglotus-6 wrote:

Ah I see. Simplified the function and updated function comment.

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


More information about the llvm-commits mailing list