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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 12:38:09 PDT 2023


aprantl added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:638
+    DenseMap<uint64_t, uint64_t> AddrIndexMap;
+    SmallVector<uint64_t> Addrs;
+
----------------
rastogishubham wrote:
> 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.
Right. I forgot we need to write out the stuff, too ;-)



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

https://reviews.llvm.org/D155724



More information about the llvm-commits mailing list