[NFC] FunctionSamples::getEntrySamples -> getHeadSamplesEstimate
authorMircea Trofin <mtrofin@google.com>
Thu, 21 Jul 2022 15:30:23 +0000 (08:30 -0700)
committerMircea Trofin <mtrofin@google.com>
Fri, 22 Jul 2022 16:17:59 +0000 (09:17 -0700)
commit7b81a81d5f9cccb1b091cfc5264bc483b0acc83a
tree6ddcbbb88af2267a262ed7a48933f86640569596
parentf5759add702eb0b1243198d7f49b7a010b977f5d
[NFC] FunctionSamples::getEntrySamples -> getHeadSamplesEstimate

The name `getEntrySamples` was misleading for 2 reasons. One, it's
close in name to `Function::getEntryCount`, but the equivalent here is
`getHeadSamples`; second, as opposed to the other get* APIs in
`FunctionSamples`, it performs an estimate/heuristic rather than just
retrieving raw data (or a non-heuristic derivate off that data, like
`getMaxCountInside`)

The new name should more clearly communicate its intent; and, being
close (in name) to `getHeadSamples`, it should allow the reader discover
the relation between them.

Also updated the doc comments for both `getHeadSamples[Estimate]` so a
reader may better understand the relation between them.

Differential Revision: https://reviews.llvm.org/D130281
llvm/include/llvm/ProfileData/SampleProf.h
llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/tools/llvm-profdata/llvm-profdata.cpp
llvm/tools/llvm-profgen/CSPreInliner.cpp
llvm/tools/llvm-profgen/ProfileGenerator.cpp