aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2020-05-21 13:28:24 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2020-05-28 10:33:05 -0700
commita7fa35a629e85a72b8cf07a8f95c7c09d9663808 (patch)
tree4cc0cbfe0b2869bebed46918faf1b593c9cc56eb /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent116dcbebc6a1648b4acd1a1a391c1d66a3eb4b5f (diff)
downloadllvm-a7fa35a629e85a72b8cf07a8f95c7c09d9663808.zip
llvm-a7fa35a629e85a72b8cf07a8f95c7c09d9663808.tar.gz
llvm-a7fa35a629e85a72b8cf07a8f95c7c09d9663808.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp1
1 files changed, 1 insertions, 0 deletions
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<ValueInfo> Refs;
if (IsThinLTO) {