[PATCH] D155257: [llvm-profdata]Changed SampleProWriter to take a range of of NameFunctionSamples
William Junda Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 13 20:07:09 PDT 2023
huangjd created this revision.
huangjd added reviewers: davidxl, xur, snehasish, ro, wenlei, aeubanks.
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.
Most functions in SampleProfWriter previously taking a
SampleProfileMap now take llvm::ArrayRef<NameFunctionSamples> instead.
The original write interface takes a SampleProfileMap and immediately
sorts it into a vector<NameFunctionSamples> before passing it down to
the actual write implementations.
The purpose of this change is to allow SampleProfWriter to take a slice
of the profile to write to file, instead of having to modify or
reconstruct a SampleProfileMap, which is very slow. In a following patch
I am going to enhance the functionality of reducing profile size limit,
which will make heavy use of the new SampleProfWriter interface.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155257
Files:
llvm/include/llvm/ProfileData/ProfileCommon.h
llvm/include/llvm/ProfileData/SampleProf.h
llvm/include/llvm/ProfileData/SampleProfWriter.h
llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
llvm/lib/ProfileData/SampleProfWriter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155257.540259.patch
Type: text/x-patch
Size: 14658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230714/65571615/attachment.bin>
More information about the llvm-commits
mailing list