[PATCH] D113296: [FS-AFDO][llvm-profgen] Generate profile with FS-AFDO discriminator
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 30 15:34:15 PST 2021
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:42
+ static uint32_t getDuplicationFactor(unsigned Discriminator,
+ bool IsFSD = UseFSDiscriminator) {
+ return IsFSD ? 1
----------------
hoy wrote:
> nit: please use full name `ProfileGeneratorBase::UseFSDiscriminator` for static fields.
>
> Also, can we check `Binary->useFSDiscriminator()` instead of parsing in an parameter?
> nit: please use full name ProfileGeneratorBase::UseFSDiscriminator for static fields.
Fixed, thanks!
> Also, can we check Binary->useFSDiscriminator() instead of parsing in an parameter?
There is one exception that calling getBaseDiscriminator in ProfiledBinary::getExpandedContext where we don't have the ProfileGenerator instance, so that needs to make it static.
see the below code:
```
Frame.Location.Discriminator = ProfileGeneratorBase::getBaseDiscriminator(
Frame.Location.Discriminator, 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