[PATCH] D30799: Refactor the PSI to extract getCallSiteCount and remove checks for profile type.
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 10:25:14 PST 2017
eraman added inline comments.
================
Comment at: include/llvm/Analysis/ProfileSummaryInfo.h:57
: M(Arg.M), Summary(std::move(Arg.Summary)) {}
+ /// Returns the callsite count for \p CallInst.
+ static Optional<uint64_t> getCallSiteCount(const Instruction *CallInst,
----------------
May be rename it to getProfileCount()?
================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:73
+ const Instruction *CallInst, BlockFrequencyInfo *BFI) {
+ if (!CallInst)
+ return None;
----------------
Add an assert to check this is CallInst or InvokeInst.
https://reviews.llvm.org/D30799
More information about the llvm-commits
mailing list