[PATCH] D113296: [FS-AFDO][llvm-profgen] Generate profile with FS-AFDO discriminator
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 23 17:04:37 PST 2021
wenlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:93
std::unique_ptr<ProfileGeneratorBase> Generator;
if (ProfileIsCS) {
Generator.reset(new CSProfileGenerator(Binary, SampleCounters));
----------------
We don't support CS+FS right now, how about error out for now to prevent misuse?
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:41-52
+ static uint32_t getDuplicationFactor(unsigned Discriminator,
+ bool IsFSD = IsFSDiscriminator) {
+ return IsFSD ? 1
+ : llvm::DILocation::getDuplicationFactorFromDiscriminator(
+ Discriminator);
}
----------------
In what scenario would use a `IsFSD` parameter different from the `ProfileGeneratorBase::IsFSDiscriminator`? Wondering if we could just omit the parameter and use `IsFSDiscriminator` directly inside.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:55
+ static bool IsFSDiscriminator;
+
----------------
nit: UseFSDiscriminator
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113296/new/
https://reviews.llvm.org/D113296
More information about the llvm-commits
mailing list