[PATCH] D32877: Restrict call metadata based hotness detection to Sample PGO mode

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 16:10:41 PDT 2017


eraman added inline comments.


================
Comment at: include/llvm/Analysis/ProfileSummaryInfo.h:62
+                                            BlockFrequencyInfo *BFI,
+                                            ProfileSummary *Summary = nullptr);
   /// \brief Returns true if \p F has hot function entry.
----------------
A major rationale for adding ProfileSummaryInfo as a separate analysis is to prevent Profilesummary from being directly manipulated, so I believe we shouldn't add an interface that takes ProfileSummary as a parameter.  As Dehao mentions below, you anyway get the module from the instruction and get the kind from there, so this is not necessary. My concern there is this becomes unnecessarily expensive as we get an invariant value (kind) many times. 


https://reviews.llvm.org/D32877





More information about the llvm-commits mailing list