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

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 08:39:21 PDT 2022


mtrofin created this revision.
mtrofin added a reviewer: xur.
Herald added subscribers: ormris, wenlei, hiraditya.
Herald added a project: All.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.

Also updated the doc comment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130281

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130281.446521.patch
Type: text/x-patch
Size: 10028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220721/7e4c625c/attachment.bin>


More information about the llvm-commits mailing list