[llvm] [ThinLTO][BitcodeWriter] Write import type in per-module combined summary (PR #87600)
Jan Voung via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 07:52:36 PDT 2024
================
@@ -1272,6 +1272,12 @@ using ModulePathStringTableTy = StringMap<ModuleHash>;
/// a particular module, and provide efficient access to their summary.
using GVSummaryMapTy = DenseMap<GlobalValue::GUID, GlobalValueSummary *>;
+/// A set of global value summary pointers.
+using GVSummaryPtrSet = SmallPtrSet<GlobalValueSummary *, 4>;
+
+/// The key is module path, and value is a set of global value summary pointers.
----------------
jvoung wrote:
Not a big issue, but was wondering if the module path is needed or if a set instead of map would work? It seemed like each GlobalValueSummary* would only be imported from one module for declaration. Or is it possible that for a particular GVS_i ?
mod_A -> GVS_i
mod_B -> GVS_i
Otherwise, the map does match the gatherImportedSummariesForModule more closely.
https://github.com/llvm/llvm-project/pull/87600
More information about the llvm-commits
mailing list