[PATCH] D150625: [PseudoProbe] Only emit discriminstor in FS-AFDO mode.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 17:43:09 PDT 2023
hoy added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/PseudoProbePrinter.cpp:49
+ if (EnableFSDiscriminator && DebugLoc &&
+ (Type == (uint64_t)PseudoProbeType::Block))
Discriminator = DebugLoc->getDiscriminator();
----------------
wenlei wrote:
> should we put in an assert to make sure we catch lurking non-zero discriminators? i.e. when FS is off, probe should always have zero discriminator?
Good point. Actually there is already an assert on IR level https://github.com/llvm/llvm-project/blob/b7d9322b4963e620dfd12246816e6f7b2da5fd88/llvm/lib/IR/PseudoProbe.cpp#L67, let me also add an assert here for MIR.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150625/new/
https://reviews.llvm.org/D150625
More information about the llvm-commits
mailing list