[PATCH] D99787: [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 5 14:28:33 PDT 2021
hoy accepted this revision.
hoy added a comment.
This revision is now accepted and ready to land.
lgtm, thanks!
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:875
// be prorated so that the it will reflect the real callsite counts.
- setProbeDistributionFactor(CI, Candidate.CallsiteDistribution * Sum /
- SumOrigin);
+ setProbeDistributionFactor(CI, 1.0 * Sum / SumOrigin);
Candidate.CallInstr = DI;
----------------
hoy wrote:
> hoy wrote:
> > Thanks for the fix. This seems losing the original distribution factor pre
> nvm, ignore this comment.
Nit: may just do a type casting here instead of using the multiplication. The compiler may not optimize it away in different FP models.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99787/new/
https://reviews.llvm.org/D99787
More information about the llvm-commits
mailing list