[PATCH] D41604: Add a pass to generate synthetic function entry counts.
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 17:38:05 PST 2018
eraman marked 2 inline comments as done.
eraman added inline comments.
================
Comment at: include/llvm/Analysis/SyntheticCountsUtils.h:27
+using Scaled64 = ScaledNumber<uint64_t>;
+void propagateSyntheticCounts(
+ const CallGraph &CG, function_ref<Scaled64(CallSite CS)> GetCallSiteWeight,
----------------
davidxl wrote:
> add documentation comments here.
I have the documentation comments next to the implementation in the cpp file.
================
Comment at: include/llvm/IR/Function.h:256
+ /// will execute.
+ Optional<uint64_t> getSyntheticEntryCount() const;
+
----------------
davidxl wrote:
> Is it better to let getEntryCount to take an optional flag to indicate 'is_synthetic'? The implementation of these two are mostly the same.
I actually intended to remove this but this slipped in. I have a follow up patch that makes EntryCount a class and make the getEntryCount return it. Using a boolean for synthetic feels brittle. Shall I remove this get method?
https://reviews.llvm.org/D41604
More information about the llvm-commits
mailing list