[PATCH] D59431: [DebugInfo] Terminate constant-value location-list ranges at the end of basic blocks
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 04:26:56 PDT 2019
jmorse added a comment.
In D59431#1436497 <https://reviews.llvm.org/D59431#1436497>, @aprantl wrote:
> So I guess the answer to my question whether this is indicative of a bug in an earlier pass is: not necessarily.
Indeed, I think it's an engineering compromise that seems to work fairly well, and requires the behaviour in LiveDebugValues/etc for correctness,
> It would be great to include a section on mem2reg and your examples to SourceLevelDebugging.rst since this will no doubt come up again in the future!
I'll be doing this immediately to ensure everyone's on the same page, plus I think the way the backend debug-stuff works has now clicked in my mind.
> If we go forward with this patch — the reason why we don't have dbg.values in the exit block in your example is because we can't introduce a new PHI for bar. But if bar is a *constant*, mem2reg could do a miniature version of LiveDebugValues that only applies to constants. Conceptually, we could move the ability to propagate constants from LiveDebugValues into mem2reg. I'm not sure if it will be worth the extra effort, but we can think about it.
(I'll get onto this once the docs for how this is supposed to work have been nailed down).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59431/new/
https://reviews.llvm.org/D59431
More information about the llvm-commits
mailing list