[PATCH] Refactor debug info lexical block generation
Paul_Robinson at playstation.sony.com
Tue May 26 21:51:48 PDT 2015
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...
More information about the llvm-commits