[PATCH] D85085: Fix debug_loc offset difference with basic block sections

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 15:00:05 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1732-1735
+    // Entries in different basic block sections can still be merged.  Here, we
+    // check if the previous entry's end label and the next entry's begin label
+    // are in adjacent basic block sections and pointing to the end of the
+    // first section and the beginning of the following section respectively.
----------------
This description sounds like it might merge across BB sections even if the location doesn't span the whole outer range.

eg: given a scope like [x, x+5) [y, y+3) and a location range of [x+3, x+5) [y, y+2) it sounds like this code might produce a single [x+3, y+2) range? That would be incorrect - since there's no ordering between the x and y ranges - so there's no way to cross the gap like that.

Could you include some test cases with interesting ranges like this to check that the DWARF is correct there?


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

https://reviews.llvm.org/D85085



More information about the llvm-commits mailing list