[PATCH] D155252: [PseudoProbe] Remove unnecessary asserts about non-zero discriminator.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 13 17:24:00 PDT 2023
hoy created this revision.
Herald added subscribers: wlei, modimo, wenlei, hiraditya.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Despite previous efforts in fixing accidentally setting deduplication factor and avoiding enforcing a callsite debug loc for pseudo probes, I'm still seeing an IR probe having a non-zero discriminator. This time it is due to the merge of two probes with irreconsilable debug locations and the merged probe ends up getting the original callsite locs. Therefore I'm removing the assert about IR probe should always have a zero discriminator. This safe since
- Probe discriminators are only emitted in FS-AFDO mode; and
- The first FS discriminator assigning pass always clears non-discriminators left over from IR passes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155252
Files:
llvm/lib/IR/PseudoProbe.cpp
Index: llvm/lib/IR/PseudoProbe.cpp
===================================================================
--- llvm/lib/IR/PseudoProbe.cpp
+++ llvm/lib/IR/PseudoProbe.cpp
@@ -64,8 +64,6 @@
Probe.Discriminator = 0;
if (const DebugLoc &DLoc = Inst.getDebugLoc())
Probe.Discriminator = DLoc->getDiscriminator();
- assert(Probe.Discriminator == 0 &&
- "Unexpected non-zero FS-discriminator for IR pseudo probes");
return Probe;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155252.540234.patch
Type: text/x-patch
Size: 462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230714/61d9bf38/attachment.bin>
More information about the llvm-commits
mailing list