[PATCH] D123469: [DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 15:14:42 PDT 2022


clayborg added a comment.

There are so many places where we redo address range and address ranges code in LLVM and LLDB. Might be worth moving the GSYM "Range.h" file into a more accessible area to avoid all of the "intersects" and "overlaps" kind of computations we do on address ranges. The code is here: llvm/include/llvm/DebugInfo/GSYM/Range.h



================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:57
-/// Map LowPC to ObjFileAddressRange.
-using RangesTy = std::map<uint64_t, ObjFileAddressRange>;
 
----------------
Would we want to include the LowPC in the ObjFileAddressRange struct and then use a std::set<ObjFileAddressRange>?


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinkerAddressRangesMap.h:52
+    // are empty anyway.
+    if (LowPC == HighPC)
+      return;
----------------
Might be worth watching out for invalid LowPC/HighPC combos by using >= instead of ==?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123469



More information about the llvm-commits mailing list