[PATCH] D150334: [llvm-profdata] Use string ref for FunctionSamplesMap

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 15:38:44 PDT 2023


wenlei 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());
----------------
This is now creating a StringRef out of a temp string `OrigChildContext.getName().str()`.


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