diff options
author | Hongtao Yu <hoy@fb.com> | 2023-05-25 22:41:58 -0700 |
---|---|---|
committer | Hongtao Yu <hoy@fb.com> | 2023-05-26 13:00:16 -0700 |
commit | 23da2106246edd445b5eae105cbefe0493f4fd1d (patch) | |
tree | bdebd3ccf13367b848235c001aa2299c748489aa /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 7c91d82ab912fae8bafc1137d4c9b17bcfb7eba7 (diff) | |
download | llvm-23da2106246edd445b5eae105cbefe0493f4fd1d.zip llvm-23da2106246edd445b5eae105cbefe0493f4fd1d.tar.gz llvm-23da2106246edd445b5eae105cbefe0493f4fd1d.tar.bz2 |
[PseudoProbe] Do not force the calliste debug loc to inlined probes from __nodebug__ functions.
For pseudo probes we would like to keep their original dwarf discriminator (either a zero or null) until the first FS-discriminator pass. The inliner is a violation of that, given that it assigns inlinee instructions with no debug info with the that of the callsite. This is being disabled in this patch.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D151568
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index b372a24..a433c83 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1636,6 +1636,12 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, if (allocaWouldBeStaticInEntry(AI)) continue; + // 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)) + continue; + BI->setDebugLoc(TheCallDL); } |