[PATCH] D38478: Use the first instruction's count to estimate the funciton's entry frequency.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 11:32:26 PDT 2017
tejohnson added a comment.
Started looking at, but have a few initial questions.
================
Comment at: include/llvm/ProfileData/SampleProf.h:303
+ /// profile without referring to potentially inaccurate debug info, this
+ /// gives more accurate profile data and is preferred for standalong symbols.
uint64_t getHeadSamples() const { return TotalHeadSamples; }
----------------
s/standalong/standalone/
================
Comment at: include/llvm/ProfileData/SampleProf.h:304
+ /// gives more accurate profile data and is preferred for standalong symbols.
uint64_t getHeadSamples() const { return TotalHeadSamples; }
----------------
Should this be used somewhere in this change since it is preferred?
================
Comment at: include/llvm/ProfileData/SampleProf.h:311
+ (CallsiteSamples.empty() ||
+ BodySamples.begin()->first < CallsiteSamples.begin()->first))
+ return BodySamples.begin()->second.getSamples();
----------------
What is this line checking?
================
Comment at: include/llvm/ProfileData/SampleProf.h:316
+ for (const auto &N_FS : CallsiteSamples.begin()->second)
+ T += N_FS.second.getEntrySamples();
+ return T;
----------------
What do these samples correspond to?
https://reviews.llvm.org/D38478
More information about the llvm-commits
mailing list