From a7fa35a629e85a72b8cf07a8f95c7c09d9663808 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 21 May 2020 13:28:24 -0700 Subject: [ThinLTO] Compute the basic block count across modules. Summary: Count the per-module number of basic blocks when the module summary is computed and sum them up during Thin LTO indexing. This is used to estimate the working set size under the partial sample PGO. This is split off of D79831. Reviewers: davidxl, espindola Subscribers: emaste, inglorion, hiraditya, MaskRay, steven_wu, dexonsmith, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80403 --- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp') diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp index b900a38..c5e5e32 100644 --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -390,6 +390,7 @@ static void computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M, .updateHotness(getHotness(Candidate.Count, PSI)); } } + Index.addBlockCount(F.size()); std::vector Refs; if (IsThinLTO) { -- cgit v1.1