[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
Mon Jul 6 17:44:11 PDT 2020


dblaikie added a comment.

In D82129#2134241 <https://reviews.llvm.org/D82129#2134241>, @probinson wrote:

> I think I didn't fully grasp that the blocks were being (tail-)merged, which makes the scope ambiguous, and all the rest.  So I withdraw the objection on that basis.  DWARF is fine with multiple variables pointing to the same location, but it's less forgiving about scopes IIRC, much like it can't describe multiple source attributions for an instructions.  This all makes me sad, but that's how DWARF is at the moment.
>
> Is there still an open question about whether this wants to be a cleanup pass or a verifier check?  I apologize for losing track.


My take on it is that it's probably not practical to do this as a cleanup - it'd mean any time we merge debug locations, etc, we'd have to go check for isolated variable locations that have become invalid.

(though, inversely: I worry that not cleaning up those variable locations might be a source of IR bloat and algorithmic scaling problems when the debug locations are scanned... )


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

https://reviews.llvm.org/D82129





More information about the llvm-commits mailing list