[PATCH] D82129: [DebugInfo] Drop location ranges for variables which exist entirely outside the variable's scope

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 17:31:46 PDT 2020


dblaikie added a comment.

Thanks for working this up/sending it out.

The textual description doesn't /sound/ like it handles partial overlap ("If the entry opens a location range which does not intersect any of the variable's scope's ranges then we mark it for removal.") how are they handled? Are locations trimmed down to match the scope range too?

I'm guessing they're actually covered and tested - overlap that extends beyond the end or start of the scope, etc.

Personally: I'm marginally in favor. Though I wouldn't mind seeing more data about cases where this turns up (which should be easier to find with this prototype) to see if they're readily fixable bugs.

Oh, also: did you try running llvm-dwarfdump statistics before/after? I believe it tracks number of bytes of variable location relative to the enclosing scope. Assuming it doesn't count bytes of variable location extending beyond the enclosing scope (if it does, that bug should be fixed - maybe flagging those "extra bytes" in a separate penalty bucket - and could have a separate penalty bucket for cases where a single location could've been used but a location list was used instead (either because of these extended scopes - or otherwise)) - the number of covered bytes should remain the same before/after this patch? Does it?


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

https://reviews.llvm.org/D82129





More information about the llvm-commits mailing list