[PATCH] D32920: Don't add DBG_VALUE instructions for static allocas in dbg.declare

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 15:12:38 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D32920#747642, @aprantl wrote:

> > They survive all the way through codegen to be ignored by DWARF emission.
>
> Why are they ignored? Shouldn't they turn the variable location into a location list that has the FI from the MMI side table *and* the DEBUG_VALUE?


It doesn't really make sense to build a location list for a variable that lives in a static alloca described with dbg.declare. There's only ever one location in memory where the variable lives. Extra instructions describing the location are kind of superfluous.

The commit message for https://reviews.llvm.org/rL113967 actually acknowledges that this code shouldn't do anything. I think it's just that whatever Devang wanted to do with this code never came to pass: "Right now, this has no material impact because varible info also collected using offset table maintained in machine module info."


https://reviews.llvm.org/D32920





More information about the llvm-commits mailing list