[llvm] [DebugInfo] Don't set prologue_end behind line-zero call insts (PR #156850)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 13:17:50 PST 2025


dwblaikie wrote:

> Hmmm, so you're saying we could potentially use the scope-line of the line-zero call instructions DILocation? I suppose that would then produce a legitimate line number that's more localised to where the call came from, which is valuable. The only risk to my mind is that we might be making this decision long after the pc_hi/pc_low or scope ranges of any deeper scopes are computed, and those might skip over line zero locations. (We can test this).

Yep, worth a test - I'd be mildly surprised if they skip line zero for scoping.

> The downside would be that putting a breakpoint on a function would not stop in that function; you would always stop at a source-location that's inlined into that function. This doesn't sound too bad given that a) these are already highly deformed functions, and b) it can happen anyway with just normal inlining.

Presumably that already happens in the non-line-zero case (if you have f1 calls f2 calls f3, and f2 is inlined into f1, and you break on f1 you probably stop on the call to f3 which is in the inlined f2)

> I'll switch to inline-scope-line shortly and see what the output looks like.

I don't feel /super/ strongly about this.

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


More information about the llvm-commits mailing list