[PATCH] D24180: Emit 'no line' information for interesting 'orphan' instructions
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 16:28:32 PDT 2016
probinson updated this revision to Diff 75364.
probinson added a comment.
Updated patch to take care of four things.
1. Internal testing came up with situations where the patch would emit multiple line-0 records in a row. We now avoid that.
2. We also found cases along these lines:
.loc 1 9 0
instr1
instr2
.loc 1 0 0
instr3
.loc 1 9 0
instr4
The naive statement-marking algorithm would put `is_stmt 1` on both instr1 and instr4, which is not good for debugging. The updated patch detects this situation and puts `is_stmt 0` on instr4.
3. We aren't sure what to emit for CodeView, so as advised by @rnk this patch now does nothing for CodeView.
4. The updated patch exposed an inadvertent flaw in test/CodeGen/X86/stack-protector.ll where a function marked as having debug info actually had no source location attached to any instructions. This led to emitting `.loc 1 0 0 prologue_end` which is obviously flawed. Attaching an actual source location to one of the instructions emits a much more sensible line table.
https://reviews.llvm.org/D24180
Files:
lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
lib/CodeGen/AsmPrinter/DebugHandlerBase.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/CodeGen/X86/stack-protector.ll
test/DebugInfo/AArch64/line-header.ll
test/DebugInfo/X86/dwarf-no-source-loc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24180.75364.patch
Type: text/x-patch
Size: 9908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/b9b0d137/attachment.bin>
More information about the llvm-commits
mailing list