[PATCH] D152320: [llvm-profdata] Use StringRef in place of string in FunctionSamplesMap

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 16:33:42 PDT 2023


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

Use StringRef instead of a string in FunctionSamplesMap's key type, because all usages of it are backed by the data of a sample profile, or sourced from a function name in the IR. It is necessary to change all usages of string into StringRef inside a SampleProfileMap to implement the 2nd phase of MD5 function name refactoring (by comparing MD5 values directly, instead of changing it to a string first)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152320

Files:
  llvm/include/llvm/ProfileData/SampleProf.h
  llvm/lib/ProfileData/SampleProf.cpp
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/tools/llvm-profdata/llvm-profdata.cpp
  llvm/tools/llvm-profgen/ProfileGenerator.cpp
  llvm/unittests/ProfileData/SampleProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152320.529086.patch
Type: text/x-patch
Size: 5879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/ddae3b62/attachment.bin>


More information about the llvm-commits mailing list