Lower dbg.declare into indirect DBG_VALUE
authorJosh Stone <jistone@redhat.com>
Tue, 11 Sep 2018 17:52:01 +0000 (17:52 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 16 Dec 2018 12:07:54 +0000 (12:07 +0000)
commite4a5a583a390ea265718d35e5e26237015f8e0d8
treedf6a8d25e58874047d332f32d85d88298f3bb986
parent4b2eaf4ff1b6d29e3f84d6b27fdde288c48c98a9
Lower dbg.declare into indirect DBG_VALUE

Summary:
D31439 changed the semantics of dbg.declare to take the address of a
variable as the first argument, making it indirect.  It specifically
updated FastISel for this change here:

https://reviews.llvm.org/D31439#change-WVArzi177jPl

GlobalISel needs to follow suit, or else it will be missing a level of
indirection in the generated debuginfo.  This problem was seen in a Rust
debuginfo test on aarch64, since GlobalISel is used at -O0 for aarch64.

https://github.com/rust-lang/rust/issues/49807
https://bugzilla.redhat.com/show_bug.cgi?id=1611597
https://bugzilla.redhat.com/show_bug.cgi?id=1625768

Reviewers: dblaikie, aprantl, t.p.northover, javed.absar, rnk

Reviewed By: rnk

Subscribers: #debug-info, rovka, kristof.beyls, JDevlieghere, llvm-commits, tstellar

Differential Revision: https://reviews.llvm.org/D51749

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341969 91177308-0d34-0410-b5e6-96231b3b80d8

Gbp-Pq: Name rustc-aarch64-test-failure.diff
lib/CodeGen/GlobalISel/IRTranslator.cpp
test/CodeGen/AArch64/GlobalISel/debug-cpp.ll [new file with mode: 0644]
test/CodeGen/AArch64/GlobalISel/debug-insts.ll