[PATCH] D150334: [llvm-profdata] Use string ref for FunctionSamplesMap
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 15:44:30 PDT 2023
hoy added inline comments.
================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:517
auto &SamplesMap = NodeProfile->functionSamplesAt(ChildNode.CallSiteLoc);
SamplesMap.emplace(OrigChildContext.getName().str(), *ChildProfile);
NodeProfile->addTotalSamples(ChildProfile->getTotalSamples());
----------------
wenlei wrote:
> This is now creating a StringRef out of a temp string `OrigChildContext.getName().str()`.
Good catch! Should just use `OrigChildContext.getName()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150334/new/
https://reviews.llvm.org/D150334
More information about the llvm-commits
mailing list