[PATCH] D149124: [llvm-profdata] ProfileReader cleanup - preparation for MD5 refactoring - 3

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 23:06:13 PDT 2023


huangjd created this revision.
huangjd added reviewers: davidxl, kazu, xur, snehasish, hoy, wenlei.
Herald added a subscriber: hiraditya.
Herald added a project: All.
huangjd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Cleanup profile reader classes to prepare for complex refactoring as propsed in D147740 <https://reviews.llvm.org/D147740>, continuing D148872 <https://reviews.llvm.org/D148872>
This is patch 3/n. This patch changes the behavior of function offset table.

Previously when reading ExtBinary profile, the funcOffsetTable (map) is always populated, and in addition if the profile is CS, the orderedFuncOffsets (list) is also populated. However when reading the function samples, only one of the container is being used, never both, so it's a huge waste of time to populate both. Added logic to select which one to use, and completely skip reading function offset table if we are in tool mode (all function samples are to be read sequentially regardless)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149124

Files:
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/lib/ProfileData/SampleProfReader.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149124.516629.patch
Type: text/x-patch
Size: 14420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/d71fde14/attachment.bin>


More information about the llvm-commits mailing list