[PATCH] D109713: [AutoFDO][llvm-profgen] Report zero count for unexecuted part of function code

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 18:27:01 PDT 2021


hoy added a comment.

In D109713#3000717 <https://reviews.llvm.org/D109713#3000717>, @wlei wrote:

> In D109713#3000685 <https://reviews.llvm.org/D109713#3000685>, @hoy wrote:
>
>> Thanks for the change. I'm wondering instead of extending `findDisjointRanges` if we can just add a post-processing pass that adds a zero sample to all line offsets. We did this for probe-based CS profile.
>
> The advantage to do it by extending `findDisjointRanges` is it can save some operations and adding zero sample for line-number is heavier than probe because it need to travels the inline callstack.
>
> For extreme case say if we have counter like [1,9999] : 1. and the function range is [1,10000], post-processing will do both for [1,9999] : 1,  [1,10000]: 0 . it's almost double the cost. pre-processing will do [1,9999] : 1 and [10000,10000]:0.

Sounds good. Leveraging the range calculator to avoid redundant scanning is smart.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109713/new/

https://reviews.llvm.org/D109713



More information about the llvm-commits mailing list