[PATCH] Refactor debug info lexical block generation
friss at apple.com
Tue May 26 22:13:25 PDT 2015
In http://reviews.llvm.org/D9960#179217, @probinson wrote:
> In http://reviews.llvm.org/D9960#179153, @friss wrote:
> > It would be nice to have a description of how exactly the patch fixes the issue. It seems easy to understand what the patch does, but I don't see where we were losing the information in the first place (ie. how does premature coalescing lose the inner variable?)
> This patch by itself isn't enough; this one is just deferring the time when pointless lexical blocks get collapsed. It's a refactoring that I asked to have done separately.
> The real problem is that a local static variable wasn't being attached to the proper lexical block, partly because the proper block no longer existed. This patch should let the lexical block live long enough to get the static variable attached (by a different patch), at which point the lexical block won't be considered pointless and won't be eliminated.
> I hope that makes sense...
Kinda. Does that mean that we never kept nested scopes or are there more intricate conditions that makes us discard that particular nested scope? (I suppose the latter because otherwise we'd never generate any lexical scope)
More information about the llvm-commits