[all-commits] [llvm/llvm-project] 7e6c87: DebugInfo: Deduplicate addresses in debug_addr

David Blaikie via All-commits all-commits at lists.llvm.org
Wed Jan 27 14:01:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e6c87ee045497ee0b6b7e55e54921b274e8a9f2
      https://github.com/llvm/llvm-project/commit/7e6c87ee045497ee0b6b7e55e54921b274e8a9f2
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2021-01-27 (Wed, 27 Jan 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DIE.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
    M llvm/test/DebugInfo/X86/ranges_always.ll

  Log Message:
  -----------
  DebugInfo: Deduplicate addresses in debug_addr

Experimental, using non-existent DWARF support to use an expr for the
location involving an addr_index (to compute address + offset so
addresses can be reused in more places).

The global variable debug info had to be deferred until the end of the
module (so bss variables would all be emitted first - so their labels
would have the relevant section). Non-bss variables seemed to not have
their label assigned to a section even at the end of the module, so I
didn't know what to do there.

Also, the hashing code is broken - doesn't know how to hash these
expressions (& isn't hashing anything inside subprograms, which seems
problematic), so for test purposes this change just skips the hash
computation. (GCC's actually overly sensitive in its hash function, it
seems - I'm forgetting the specific case right now - anyway, we might
want to just use the frontend-known file hash and give up on optimistic
.dwo/.dwp reuse)




More information about the All-commits mailing list