[PATCH] D104584: [SampleFDO] Make FSDiscriminator flag part of function parameters
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 10:31:46 PDT 2021
xur added inline comments.
================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2203-2210
unsigned DILocation::getBaseDiscriminator() const {
- return getBaseDiscriminatorFromDiscriminator(getDiscriminator());
+ return getBaseDiscriminatorFromDiscriminator(getDiscriminator(),
+ EnableFSDiscriminator);
+}
+unsigned DILocation::getBaseDiscriminator(bool IsFSDiscriminator) const {
+ return getBaseDiscriminatorFromDiscriminator(getDiscriminator(),
+ IsFSDiscriminator);
----------------
wmi wrote:
> Can we just use "unsigned DILocation::getBaseDiscriminator(bool IsFSDiscriminator = false)" or we still need the two API?
Note that one still checks the option of enable-fs-discrminator. And the other uses a flag (when we know for sure the format).
If we just keep one, we will probably keep the one without parameters.
If we want to use the one with default (false) parameters, we need to set the options in many callers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104584/new/
https://reviews.llvm.org/D104584
More information about the llvm-commits
mailing list