[PATCH] D60903: [SampleFDO] Never set profile entry count to 0
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 10:35:47 PDT 2019
wmi added a comment.
In D60903#1472769 <https://reviews.llvm.org/D60903#1472769>, @davidxl wrote:
> Looked at the Instruction::updateProfWeight() --- the part that update branch_weights seems bogus -- there is need need to scale branch weight at all.
>
> VP data needs to be scaled of course, but if 'S' or 'T' is zero, just zero them out.
Discussed with David offline: SamplePGO borrow the branch_weight meta data to represent call count, so the update for it is needed. But scaling branch weights for branch instructions is unnecessary and will introduce more inaccuracy. We need some refactoring in this part. I will do that in a follow up patch.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60903/new/
https://reviews.llvm.org/D60903
More information about the llvm-commits
mailing list