[all-commits] [llvm/llvm-project] 4fe91e: [llvm-profdata] ProfileReader cleanup - preparatio...
William Junda Huang via All-commits
all-commits at lists.llvm.org
Fri May 12 13:46:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4fe91e083a25715880992ea18ae474a3e4dae93f
https://github.com/llvm/llvm-project/commit/4fe91e083a25715880992ea18ae474a3e4dae93f
Author: William Huang <williamjhuang at google.com>
Date: 2023-05-12 (Fri, 12 May 2023)
Changed paths:
M llvm/include/llvm/ProfileData/SampleProfReader.h
M llvm/lib/ProfileData/SampleProfReader.cpp
Log Message:
-----------
[llvm-profdata] ProfileReader cleanup - preparation for MD5 refactoring - 3
Cleanup profile reader classes to prepare for complex refactoring as propsed in D147740, continuing 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)
Reviewed By: davidxl, wenlei
Differential Revision: https://reviews.llvm.org/D149124
More information about the All-commits
mailing list