[PATCH] D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 06:44:15 PST 2018
tejohnson added inline comments.
================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:268
+ (F && F->hasFnAttribute("profile-sample-accurate")))
+ return !Count || isColdCount(*Count);
+ }
----------------
Don't need to do extra checking unless !Count, so you could simplify like:
if (Count)
return isColdCount(*Count);
if (!hasSampleProfile())
return false;
const Function *F = BB->getParent();
return ProfileSampleAccurate ||
(F && F->hasFnAttribute("profile-sample-accurate"));
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55567/new/
https://reviews.llvm.org/D55567
More information about the llvm-commits
mailing list