[PATCH] D95617: [DWARF] Inlined variables with no location should not have a DW_TAG_variable

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 6 13:07:40 PST 2021


dblaikie added a comment.

In D95617#2541646 <https://reviews.llvm.org/D95617#2541646>, @jmorse wrote:

> I reverted this as a builtbot objected:
>
>   http://lab.llvm.org:8011/#builders/105/builds/5486
>
> The failing test, missing-abstract-variable.ll, is a known bad behaver on certain platforms. In the past it's been XFailed on those platforms because certain inlined parameters get optimised out. That xfail was deleted after these two commits:
>
>   https://reviews.llvm.org/rGff2073a51fe283bde05f48c300e3a9ee807b1b6d
>   https://reviews.llvm.org/rG93faeecd8fa1fc148f2ee0d0cb64f11c3d41ce49
>
> I believe the latter was allowing more DBG_VALUEs to pass through isel, which are then optimised out in this test. The behaviour that lets this test pass on (mips, powerpc64, s390x, sparc) is thus exactly the behaviour this patch is trying to disable, and it's fine to re-apply the XFail.
>
> I'll leave this as re-opened but accepted for a ~day, I'm confident about the fix but wanted somewhere to write the explanation, plus leave a little time in case there's a wider view.

In a separate/preparatory commit, perhaps you could add checks that these inlined formal parameters have DW_AT_location. (& adding the xfail for the architectures that don't have locations on these variables/parameters)

& then this change won't have to touch that test, I think.


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

https://reviews.llvm.org/D95617



More information about the llvm-commits mailing list