[PATCH] D155724: Change DW_LLE_baseaddr to DW_LLE_baseaddrx in .debug_loclist section

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 12:32:44 PDT 2023


rastogishubham added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:638
+    DenseMap<uint64_t, uint64_t> AddrIndexMap;
+    SmallVector<uint64_t> Addrs;
+
----------------
aprantl wrote:
> This hasn't been introduced by this patch, but I'm curious why we need to store the addresses twice? Would   `AddrIndexMap.insert(std::make_pair(Addr, AddrIndexMap.size()))` work just as well?
It is a matter of space vs size, if we get rid of `SmallVector<uint64_t> Addrs;` we will have to sort the `AddrIndexMap` by index and then output the .debug_addr section.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155724/new/

https://reviews.llvm.org/D155724



More information about the llvm-commits mailing list