[llvm] [MergeFunctions] Add debug locations to redirected calls (PR #225625)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 05:32:28 PDT 2026
jmorse wrote:
NB: I'm not familiar with the MergeFunctions use cases, but the motivation for that verifier check is inlining, in that something has to appear on the inlined callstack when presented to the user, thus every call needs to have a source location. Line zero can be appropriate in various scenarios when there's no clear attributable source line.
Slightly trickier though is the scope: if I'm reading correctly, you're generating a fresh new DILocation with the scope set to the containing function? If so, this risks dropping any inlining history recording how the calls ended up where they did, users might step one instruction and find themselves in a reportedly different callstack location when nothings really changed. Again though, that might be the best you can hope for, depending on what the optimisation is doing.
https://github.com/llvm/llvm-project/pull/225625
More information about the llvm-commits
mailing list