[PATCH] D52125: X86, AArch64, ARM: Do not attach debug location to spill/reload instructions

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 14:52:05 PDT 2018


MatzeB added a comment.

In https://reviews.llvm.org/D52125#1253119, @vsk wrote:

> In https://reviews.llvm.org/D52125#1253075, @eugenis wrote:
>
> > In case someone wants to look at debug info issue:
> >  F7347208: 1.ii <https://reviews.llvm.org/F7347208> test case
> >  bin/clang++ -fsanitize=hwaddress --target=aarch64-linux-android  -gline-tables-only -O0 1.ii -c
>
>
> I can reproduce the issue. I think the unexpected locations come from DwargDebug::beginInstruction:
>
>   if (!DL) {
>     // We have an unspecified location, which might want to be line 0.
>   
>
> Apparently there's a toggle which can switch off this behavior: -mllvm -use-unknown-locations=Disable.
>
> ... and trying again with that option set, the line table bloat is gone.
>
> By default line 0 locations are enabled if the instruction is the first inst in a block, or is after a label. That seems reasonable, but in light of this issue it might be worth revisiting.


Interesting. I can understand that we don't want debug locs from the previous block to flow over. I guess we could take the next debug loc we can find (in the same basic block) in a case like this.
I'll look into this before attempting to re-commit this...


Repository:
  rL LLVM

https://reviews.llvm.org/D52125





More information about the llvm-commits mailing list