[PATCH] D144337: Prevent line 0 instructions from dividing a lexical block into ranges

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 12:50:41 PDT 2023


dblaikie added a comment.

In D144337#4185295 <https://reviews.llvm.org/D144337#4185295>, @ykhatav wrote:

> In D144337#4183551 <https://reviews.llvm.org/D144337#4183551>, @dblaikie wrote:
>
>> Could you describe why this relates to/depends on the "UnknownLocations" flag? I'm not following from the description - we could still describe these locations as being at line zero, while including them in lexical scopes to avoid fragmented ranges, I think?
>
> The reason why we want to check for “UnknownLocations” flag is that this flag is used to check if we want to add line 0 entries in the line table (in DwarfDebug.cpp) and thereby controlling whether or not line zero instructions are represented in the debug information. If we don’t check for this flag and skip the line 0 entries while extracting lexical scopes there will be a mismatch in the line table entries and lexical scopes.

Sorry, still not quite following. Could you walk me through an example of the bug you're trying to address with this patch? And an example of the bug you're trying to avoid introducing/that causes you to need this extra `UnknownLocations` checking?


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

https://reviews.llvm.org/D144337



More information about the llvm-commits mailing list