[PATCH] D58832: [SampleFDO] add suffix elision control for fcn names

Than McIntosh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 09:06:35 PST 2019


thanm created this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

Add hooks for determining the policy used to decide whether/how
to chop off symbol 'suffixes' when locating a given function
in a sample profile.

Prior to this change, any function symbols of the form "X.Y" were
elided/truncated into just "X" when looking up things in a sample
profile data file.

With this change, the policy on suffixes can be changed by adding a
new attribute "sample-profile-suffix-elision-policy" to the function:
this attribute can have the value "all" (the default), "selected", or
"none". A value of "all" preserves the previous behavior (chop off
everything after the first "." character, then treat that as the
symbol name). A value of "selected" chops off only the rightmost
".llvm.XXXX" suffix (where "XXX" is any string not containing a "."
char). A value of "none" indicates that names should be left as is.


Repository:
  rL LLVM

https://reviews.llvm.org/D58832

Files:
  include/llvm/ProfileData/SampleProf.h
  include/llvm/ProfileData/SampleProfReader.h
  lib/ProfileData/SampleProfReader.cpp
  unittests/ProfileData/SampleProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58832.188926.patch
Type: text/x-patch
Size: 9473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190301/0cb283cd/attachment.bin>


More information about the llvm-commits mailing list