[all-commits] [llvm/llvm-project] 7b81a8: [NFC] FunctionSamples::getEntrySamples -> getHeadS...
Mircea Trofin via All-commits
all-commits at lists.llvm.org
Fri Jul 22 09:18:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7b81a81d5f9cccb1b091cfc5264bc483b0acc83a
https://github.com/llvm/llvm-project/commit/7b81a81d5f9cccb1b091cfc5264bc483b0acc83a
Author: Mircea Trofin <mtrofin at google.com>
Date: 2022-07-22 (Fri, 22 Jul 2022)
Changed paths:
M llvm/include/llvm/ProfileData/SampleProf.h
M llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
M llvm/lib/Transforms/IPO/SampleProfile.cpp
M llvm/tools/llvm-profdata/llvm-profdata.cpp
M llvm/tools/llvm-profgen/CSPreInliner.cpp
M llvm/tools/llvm-profgen/ProfileGenerator.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list