[llvm] [ThinLTO] Shrink GlobalValueSummary by 8 bytes (PR #107342)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 10:29:25 PDT 2024


================
@@ -99,10 +99,11 @@ extern cl::opt<bool> MemProfReportHintedSizes;
 // can only take an address of basic block located in the same function.
 // Set `RefLocalLinkageIFunc` to true if the analyzed value references a
 // local-linkage ifunc.
-static bool findRefEdges(ModuleSummaryIndex &Index, const User *CurUser,
-                         SetVector<ValueInfo, std::vector<ValueInfo>> &RefEdges,
-                         SmallPtrSet<const User *, 8> &Visited,
-                         bool &RefLocalLinkageIFunc) {
+static bool
+findRefEdges(ModuleSummaryIndex &Index, const User *CurUser,
+             SetVector<ValueInfo, SmallVector<ValueInfo, 0>> &RefEdges,
----------------
kazutakahirata wrote:

Thanks!  I'll go through the parameter types.  By the way, here, we have `SetVector<ValueInfo, SmallVector<ValueInfo, 0>> &`.  We can cast `SmallVector<T, 0> &` to `SmallVectorImpl<T> &`, but I don't think we can cast `SetVector<ValueInfo, SmallVector<ValueInfo, 0>> &` to `SetVector<ValueInfo, SmallVectorImpl<ValueInfo>> &`.  Note that `SmallVector` is embedded in a parent type, namely `SetVector`.

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


More information about the llvm-commits mailing list