[llvm] [ThinLTO] Use a set rather than a map to track exported ValueInfos. (PR #97360)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 11:15:28 PDT 2024
================
@@ -995,26 +995,19 @@ static bool isGlobalVarSummary(const ModuleSummaryIndex &Index,
return false;
}
-// Return the number of global summaries and record the number of function
-// summaries as output parameter.
-static unsigned numGlobalVarSummaries(const ModuleSummaryIndex &Index,
- FunctionImporter::ExportSetTy &ExportSet,
- unsigned &DefinedFS) {
+// Return the number of global summaries in ExportSet.
+static unsigned
+numGlobalVarSummaries(const ModuleSummaryIndex &Index,
+ FunctionImporter::ExportSetTy &ExportSet) {
unsigned NumGVS = 0;
- DefinedFS = 0;
- for (auto &VI : ExportSet) {
+ for (auto &VI : ExportSet)
if (isGlobalVarSummary(Index, VI.getGUID()))
++NumGVS;
- else
- ++DefinedFS;
- }
return NumGVS;
}
-// Return the number of global summaries and record the number of function
-// summaries as output parameter. This is the same as `numGlobalVarSummaries`
-// except that it takes `FunctionImporter::FunctionsToImportTy` as input
-// parameter.
+// Given ImportMap, return the number of global summaries and record the number
----------------
teresajohnson wrote:
ditto
https://github.com/llvm/llvm-project/pull/97360
More information about the llvm-commits
mailing list