[PATCH] D104584: [SampleFDO] Make FSDiscriminator flag part of function parameters

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 18:19:16 PDT 2021


xur created this revision.
xur added reviewers: wmi, hoy, wenlei.
Herald added subscribers: dexonsmith, hiraditya.
xur requested review of this revision.
Herald added a project: LLVM.

dd a parameter of IsFSDiscriminator to function
getBaseDiscriminator(), and
getBaseDiscriminatorFromDiscriminator().

Both functions currently check internal flag of
--enable-fs-discriminator.  This is not good because we might
change the default value of the internal flag.

Note that we have a default parameter in
getBaseDiscriminatorFromDiscriminator(). This is just
because that the create_afdo_tool has a call-site to it.
I will remove the default parameter in a later patch.

This is pretty much NFC.


https://reviews.llvm.org/D104584

Files:
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
  llvm/lib/ProfileData/SampleProf.cpp
  llvm/tools/llvm-profgen/ProfiledBinary.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104584.353142.patch
Type: text/x-patch
Size: 5253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210619/3022f24c/attachment.bin>


More information about the llvm-commits mailing list