[lld] [llvm] [ICF] Add a NOP after branch in ICF thunk to improve debugability (PR #154986)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 14:00:50 PDT 2025


dwblaikie wrote:

> FYI: @dwblaikie Seems you guys had [a similar discussion](https://github.com/llvm/llvm-project/pull/110192#issuecomment-2427949464) a year ago

Thanks for dredging up the history, perhaps it's informative to you/your work now.



> > any of those values would be OK, doesn't matter if the padding is included in the function or not)
> 
> I agree, if the last row's address is not considered as part of the Sequence, it shouldn't bother with symbolication.
> 
> If we agree that its `-mllvm -emit-func-debug-line-table-offsets` itself, not the linetable that's buggy, let me draft a patch to update how this `end_seqence` is emitted. We could emit an `DW_LNS_advance_pc` by `MinInstLength` before `DW_LNE_end_sequence`:

That still sounds like a bit of a dodgy workaround for some more fundamental problem - we know how long the instruction is, we can produce a sequence that properly describes it (as can be seen in other single-instruction examples, with `-ffunction-sections`, etc) - we should figure out how those work correctly and how the `-emit-func-debug-line-table-offsets` is missing that functionality and correct that, hopefully.

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


More information about the llvm-commits mailing list