[llvm] [DebugInfo][DWARF] Set is_stmt on first non-line-0 instruction in BB (PR #105524)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 06:35:01 PDT 2024


SLTozer wrote:

This does result in some is_stmts being added that are unnecessary, i.e. cases where the last instruction in the current BB's sole predecessor has the same line number as the first instruction in the current BB. We could potentially include that in the analysis, but I think there's no way to do so without doing a more complex (though probably not too expensive) analysis in DwarfDebug; we also wouldn't be able to account for indirect branches.

I think in any case this patch is an improvement if we're considering such cases, as not only might the current BB not have the previous BB as its sole predecessor, but the previous BB might not even be a predecessor - making the is_stmt-elision completely incorrect.

https://github.com/llvm/llvm-project/pull/105524


More information about the llvm-commits mailing list