[llvm] [KeyInstr] Use DISubprogram's is-key-instructions-on flag at DWARF emission (PR #144104)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 04:27:03 PDT 2025
================
@@ -2651,7 +2662,13 @@ void DwarfDebug::beginFunctionImpl(const MachineFunction *MF) {
PrologEndLoc = emitInitialLocDirective(
*MF, Asm->OutStreamer->getContext().getDwarfCompileUnitID());
- if (KeyInstructionsAreStmts)
+ // If this function wasn't built with Key Instructions but has a function
+ // inlined into it that was, we treat the inlined instance as if it wasn't
+ // built with Key Instructions. If this function was built with Key
+ // Instructions but a function inlined into it wasn't then we continue to use
+ // Key Instructions for this function and fall back to non-key behaviour for
+ // the inlined function (except it doesn't beneit from findForceIsStmtInstrs).
----------------
jmorse wrote:
```suggestion
// the inlined function (except it doesn't benefit from findForceIsStmtInstrs).
```
https://github.com/llvm/llvm-project/pull/144104
More information about the llvm-commits
mailing list