[PATCH] D152758: [NFC] Refactor MBB hotness/coldness into templated PSI functions
Han Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 20:50:43 PDT 2023
shenhan added inline comments.
================
Comment at: llvm/include/llvm/Analysis/ProfileSummaryInfo.h:277
+ template <typename FunctionType>
+ std::optional<uint64_t> findTotalCallCount(const FunctionType *F) const {
+ if (!hasSampleProfile())
----------------
wenlei wrote:
> wenlei wrote:
> > Call and Invoke are specific to IR version, so checking that in generic implementation is a bit weird. I'd suggest let generic implementation return `std::nullopt`, and have IR version check on Call and Invoke.
> also nit: `findTotalCallCount`->`getTotalCallCount` to be consistent with `getProfileCount`.
Good point. Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152758/new/
https://reviews.llvm.org/D152758
More information about the llvm-commits
mailing list