[PATCH] D103550: [SampleFDO] New hierarchical discriminator for FS SampleFDO (llvm-profdata part)
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 09:21:13 PDT 2021
xur marked an inline comment as done.
xur added inline comments.
================
Comment at: llvm/include/llvm/Support/Discriminator.h:59
Base = 0,
Pass0 = 0,
Pass1 = 1,
----------------
wenlei wrote:
> The cl::opt FSDiscriminatorPassOption doesn't have Pass0. Was it intentional to allow Pass0 as alias for Base?
Yes. that's an alias (same as Pass4 and PassLast).
I did not add the aliases the cl::opt because they are not essential part of the functionality (this is an internal optional anyway).
================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:572
auto Reader = std::move(ReaderOrErr.get());
+ setDiscriminatorMaskedBit(Reader.get());
if (std::error_code EC = Reader->read())
----------------
hoy wrote:
> I'm wondering if this can be moved into `SampleProfileReader::create` with the mask as an extra parameter of it.
That's a good idea -- I think this would simplify the code. Let me do the change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103550/new/
https://reviews.llvm.org/D103550
More information about the llvm-commits
mailing list