[PATCH] D31950: SamplePGO: convert callsite samples map key from callsite_location to callsite_location+callee_name
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 09:46:36 PDT 2017
davidxl added inline comments.
================
Comment at: include/llvm/ProfileData/SampleProf.h:276
+ return nullptr;
+ const auto &FS = iter->second.find(CalleeName);
+ if (FS != iter->second.end())
----------------
do you need to use const & here? just 'auto FS = ..'
================
Comment at: include/llvm/ProfileData/SampleProf.h:281
+ const FunctionSamples *R = nullptr;
+ for (const auto &NameFS : iter->second)
+ if (NameFS.second.getTotalSamples() >= MaxTotalSamples) {
----------------
What does this loop do?
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:597
+
+ if (const FunctionSamplesMap *M = FS->findFunctionSamplesMapAt(
+ LineLocation(getOffset(DIL), DIL->getBaseDiscriminator()))) {
----------------
early return when M == null.
https://reviews.llvm.org/D31950
More information about the llvm-commits
mailing list