[PATCH] D16569: Emit line 0 line information for interesting 'orphan' instructions

Frederic Riss via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 18:13:23 PST 2016


friss added a comment.

In http://reviews.llvm.org/D16569#336876, @probinson wrote:

> Removing the LastWasCall check got the size increase down to about 18%.
>  Wolfgang thinks the PrevLabel check contributes very little.  Did you have a particular example where you thought the PrevLabel (but not at top-of-block) case would matter to the debugging experience?


Yes. The PrevLabel check is my main motivation for this. The case I'm looking at is C++ code compiled at O0 with some always_inline methods. One inline block happens to end on an instruction that has no line information. When the debugger (LLDB) steps out of the fake inline frame, it looks at the line table to find out where it is. The previous line entry can't cover this location as it was in another frame and the next line entry hasn't started yet. So the debugger stops in some weird state. The label check ensures that any instruction pointed to gets line information.

(It's pretty easy to trigger this behavior, I can share the test case. The generated IR is too big to turn it into a useful unit test though).


http://reviews.llvm.org/D16569





More information about the llvm-commits mailing list