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

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 13:51:04 PDT 2018


vsk added a comment.

In https://reviews.llvm.org/D52125#1253039, @eugenis wrote:

> It's a bug in HWASan where we symbolize the address of the previous instruction, as usual when going up the stack (call instruction is at function return address - 4), but fault address from the signal handler does not need this adjustment. The previous instruction happens to be a reload (with -O0).
>
> I'll fix it.
>
> I've noticed that your change increases the size of .debug_line with HWASan, -gline-tables-only and -O0 by ~50%. Perhaps this is the worst possible case, because HWASan inserts lots of short cold BBs, something like
>
>   if (unlikely(bad_address)) {x0 = addr; brk; unreachable; }
>
> before each memory access, and at -O0 there is often a reload of addr in the cold branch.
>  [snip]


With this patch, the reload doesn't have a location. ISTM that the bug causing line table bloat is that the dwarf generator is emitting 0 locations when it shouldn't be.


Repository:
  rL LLVM

https://reviews.llvm.org/D52125





More information about the llvm-commits mailing list