[PATCH] D9887: [DebugInfo][FastISel] Prevent using debug location from previous block for local values

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 16 17:56:44 PST 2016


probinson added a comment.

In http://reviews.llvm.org/D9887#328125, @friss wrote:

> While I really like the simplicity of that (if debuggers can cope), it means that the line table will have 0 entries at the beginning of most (I'm guessing the 'most' part here) basic blocks, which would make them much bigger (and thus slower to write out). If my fears are unfounded, then I think this 0 idea is by far the best compromise!


If we say that we just have to set the line number, and not the file and column numbers, I think "much bigger" is not real.  Setting line number to 0 typically would require a DW_LNS_advance_line which is 1 byte plus the SLEB128-encoded offset, i.e. the negative of the current line number. (We'll assume that we don't need to reset the current file or column.) Then it would take another one to put the line number back.  That would generally be 4 or 6 bytes per basic-block-that-had-these-instructions, for source files up to ~8K lines.

Emitting column numbers probably costs about as much, if not more (generally 2 bytes each time the column number changes), with less clear benefit.  Generating some actual data would be nice, of course, but I'm not inclined to worry about it.


Repository:
  rL LLVM

http://reviews.llvm.org/D9887





More information about the llvm-commits mailing list