[PATCH] D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 08:50:33 PST 2018
wmi marked an inline comment as done.
wmi added inline comments.
================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:268
+ (F && F->hasFnAttribute("profile-sample-accurate")))
+ return !Count || isColdCount(*Count);
+ }
----------------
tejohnson wrote:
> 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"));
>
Thanks, that is better, Fixed.
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