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

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 15:01:48 PST 2016


echristo added a comment.

In http://reviews.llvm.org/D9887#327337, @dblaikie wrote:

> (un-accept, didn't mean to override some of the thread context & I missed it while reading back over this - so going back to a "discussion" state)
>
> my basic thinking is: We know some instructions will never have locations on them (synthesized instructions for various reasons, etc) & if those instructions ever end up at the start of a block we'll probably get bad behavior (because they'll be assigned to whatever location is at the end of the block that happens to be laid out prior to this one) so we'll want this backpropagation regardless of any fixes we make to constants.
>
> Yes, putting single-use constants at their use would be nice/good/better (especially for things like asan), maybe even putting multi-use constants at their first use (is that always possible, though? do we ever propagate a constant load from two basic blocks into a common prior block for example?) if possible.


This is a pretty compelling argument, another thought is can we just assume line/column 0 on anything that doesn't have a location and actually use that in the output line table? Will gdb/lldb/other debuggers skip over things (this will help in the "what if we have a block with no instructions with locations on it" issue here) or will they do something silly?


Repository:
  rL LLVM

http://reviews.llvm.org/D9887





More information about the llvm-commits mailing list