[PATCH] D151568: [PseudoProbe] Do not force the calliste debug loc to inlined probes from __nodebug__ functions.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 11:06:21 PDT 2023


wenlei added a comment.

> For pseudo probes we would like to keep their original debug location

Is this accurate? we just don't want to have non-zero discriminator for probes, but we don't really care about whether their debug metadata point to original debug location or not. In this particular case, there's just no need to fill in call debug info if probe from inlinee originally doesn't have debug info.



================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1639-1642
+      // Do not force a debug loc for pseudo probes, since they do not need to
+      // be debuggable, and also they are expected to have a zero/null dwarf
+      // discriminator at this point which could be violated otherwise.
+      if (!isa<PseudoProbeInst>(BI))
----------------
nit: follow the style above, as we don't want to make a single complicated condition check in the future. 

```
// ...
if (isa<PseudoProbeInst>(BI))
  continue;
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151568/new/

https://reviews.llvm.org/D151568



More information about the llvm-commits mailing list