[PATCH] D130281: [NFC] FunctionSamples::getEntrySamples -> getEntryBBSampleCountEstimate

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 11:46:56 PDT 2022


hoy added a comment.

In D130281#3669528 <https://reviews.llvm.org/D130281#3669528>, @mtrofin wrote:

> In D130281#3669191 <https://reviews.llvm.org/D130281#3669191>, @wenlei wrote:
>
>> Maybe getEntrySampleEstimate? the heuristic doesn't guarantee we get the counts for entry BB.
>
> It does try to offer an estimate corresponding to that, though, if that's missing - hmmm... how about getHeadSamplesEstimate? It corresponds to what we call "head samples" in FunctionSamples (we're really not using "entry" in these APIs); it's discoverable right next to the getHeadSamples() API, and the "estimate" suffix should offer sufficient of a hint that it's a heuristic, and one would then be incentivized to read the docstring. I'd also, then, highlight in the comment the distinction between the two (i.e. one is raw data, while the "estimate" is, well, trying to produce a number using heuristic, etc)
>
> WDYT?

`getHeadSamplesEstimate` sounds good to me. I don't see a big difference between "head" and "entry" so using one term only should be more clear.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130281



More information about the llvm-commits mailing list