Your message dated Thu, 01 Nov 2018 20:51:43 +0000
with message-id <[email protected]>
and subject line Bug#909705: fixed in llvm-toolchain-7 1:7-8
has caused the Debian Bug report #909705,
regarding llvm-toolchain-7: please backport D51749 for a rustc aarch64 test 
failure
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
909705: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909705
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: llvm-toolchain-7
Version: 1:7-2
Severity: normal
Tags: patch upstream

Dear Maintainer,

Please apply the attached patch, it fixes a test failure in rustc.

see https://github.com/rust-lang/rust/pull/54136 for details.

X

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable'), (300, 'unstable'), (100, 'experimental'), 
(1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From 1c34cd56bc59b1540e0a814d2f80ade77daa9248 Mon Sep 17 00:00:00 2001
From: Josh Stone <[email protected]>
Date: Tue, 11 Sep 2018 17:52:01 +0000
Subject: [PATCH] [GlobalISel] 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
---
 lib/CodeGen/GlobalISel/IRTranslator.cpp       |  9 ++-
 test/CodeGen/AArch64/GlobalISel/debug-cpp.ll  | 67 +++++++++++++++++++
 .../CodeGen/AArch64/GlobalISel/debug-insts.ll |  4 +-
 3 files changed, 74 insertions(+), 6 deletions(-)
 create mode 100644 test/CodeGen/AArch64/GlobalISel/debug-cpp.ll

diff --git a/lib/CodeGen/GlobalISel/IRTranslator.cpp 
b/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 974629bc4f4..f7b905c9db4 100644
--- a/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -758,9 +758,12 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst 
&CI, Intrinsic::ID ID,
       // instructions (in fact, they get ignored if they *do* exist).
       MF->setVariableDbgInfo(DI.getVariable(), DI.getExpression(),
                              getOrCreateFrameIndex(*AI), DI.getDebugLoc());
-    } else
-      MIRBuilder.buildDirectDbgValue(getOrCreateVReg(*Address),
-                                     DI.getVariable(), DI.getExpression());
+    } else {
+      // A dbg.declare describes the address of a source variable, so lower it
+      // into an indirect DBG_VALUE.
+      MIRBuilder.buildIndirectDbgValue(getOrCreateVReg(*Address),
+                                       DI.getVariable(), DI.getExpression());
+    }
     return true;
   }
   case Intrinsic::dbg_label: {
diff --git a/test/CodeGen/AArch64/GlobalISel/debug-cpp.ll 
b/test/CodeGen/AArch64/GlobalISel/debug-cpp.ll
new file mode 100644
index 00000000000..e603af678de
--- /dev/null
+++ b/test/CodeGen/AArch64/GlobalISel/debug-cpp.ll
@@ -0,0 +1,67 @@
+; RUN: llc -global-isel -mtriple=aarch64 %s -stop-after=irtranslator -o - | 
FileCheck %s
+; RUN: llc -mtriple=aarch64 -global-isel --global-isel-abort=0 -o /dev/null
+
+; struct NTCopy {
+;   NTCopy();
+;   NTCopy(const NTCopy &);
+;   int x;
+; };
+; int foo(NTCopy o) {
+;   return o.x;
+; }
+
+; ModuleID = 'ntcopy.cpp'
+source_filename = "ntcopy.cpp"
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
+
+%struct.NTCopy = type { i32 }
+
+; CHECK-LABEL: name: _Z3foo6NTCopy
+; CHECK: DBG_VALUE debug-use %{{[0-9]+}}(p0), 0, !23, !DIExpression(), 
debug-location !24
+; Function Attrs: noinline nounwind optnone
+define dso_local i32 @_Z3foo6NTCopy(%struct.NTCopy* %o) #0 !dbg !7 {
+entry:
+  call void @llvm.dbg.declare(metadata %struct.NTCopy* %o, metadata !23, 
metadata !DIExpression()), !dbg !24
+  %x = getelementptr inbounds %struct.NTCopy, %struct.NTCopy* %o, i32 0, i32 
0, !dbg !25
+  %0 = load i32, i32* %x, align 4, !dbg !25
+  ret i32 %0, !dbg !26
+}
+
+; Function Attrs: nounwind readnone speculatable
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+attributes #0 = { noinline nounwind optnone }
+attributes #1 = { nounwind readnone speculatable }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4, !5}
+!llvm.ident = !{!6}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, 
producer: "clang version 8.0.0 ", isOptimized: false, runtimeVersion: 0, 
emissionKind: FullDebug, enums: !2, nameTableKind: None)
+!1 = !DIFile(filename: "ntcopy.cpp", directory: "/tmp")
+!2 = !{}
+!3 = !{i32 2, !"Dwarf Version", i32 4}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
+!5 = !{i32 1, !"wchar_size", i32 4}
+!6 = !{!"clang version 8.0.0 "}
+!7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo6NTCopy", scope: 
!1, file: !1, line: 6, type: !8, isLocal: false, isDefinition: true, scopeLine: 
6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
+!8 = !DISubroutineType(types: !9)
+!9 = !{!10, !11}
+!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "NTCopy", 
file: !1, line: 1, size: 32, flags: DIFlagTypePassByReference, elements: !12, 
identifier: "_ZTS6NTCopy")
+!12 = !{!13, !14, !18}
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !11, file: !1, 
line: 4, baseType: !10, size: 32)
+!14 = !DISubprogram(name: "NTCopy", scope: !11, file: !1, line: 2, type: !15, 
isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, 
isOptimized: false)
+!15 = !DISubroutineType(types: !16)
+!16 = !{null, !17}
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64, flags: 
DIFlagArtificial | DIFlagObjectPointer)
+!18 = !DISubprogram(name: "NTCopy", scope: !11, file: !1, line: 3, type: !19, 
isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, 
isOptimized: false)
+!19 = !DISubroutineType(types: !20)
+!20 = !{null, !17, !21}
+!21 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !22, size: 64)
+!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !11)
+!23 = !DILocalVariable(name: "o", arg: 1, scope: !7, file: !1, line: 6, type: 
!11)
+!24 = !DILocation(line: 6, column: 16, scope: !7)
+!25 = !DILocation(line: 7, column: 12, scope: !7)
+!26 = !DILocation(line: 7, column: 3, scope: !7)
diff --git a/test/CodeGen/AArch64/GlobalISel/debug-insts.ll 
b/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
index 8309e00e2fc..256eb37f6d4 100644
--- a/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
+++ b/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
@@ -6,18 +6,16 @@
 ; CHECK:    - { id: {{.*}}, name: in.addr, type: default, offset: 0, size: 
{{.*}}, alignment: {{.*}},
 ; CHECK-NEXT: callee-saved-register: '', callee-saved-restored: true,
 ; CHECK-NEXT: debug-info-variable: '!11', debug-info-expression: 
'!DIExpression()',
-; CHECK: DBG_VALUE debug-use %0(s32), debug-use $noreg, !11, !DIExpression(), 
debug-location !12
 define void @debug_declare(i32 %in) #0 !dbg !7 {
 entry:
   %in.addr = alloca i32, align 4
   store i32 %in, i32* %in.addr, align 4
   call void @llvm.dbg.declare(metadata i32* %in.addr, metadata !11, metadata 
!DIExpression()), !dbg !12
-  call void @llvm.dbg.declare(metadata i32 %in, metadata !11, metadata 
!DIExpression()), !dbg !12
   ret void, !dbg !12
 }
 
 ; CHECK-LABEL: name: debug_declare_vla
-; CHECK: DBG_VALUE debug-use %{{[0-9]+}}(p0), debug-use $noreg, !14, 
!DIExpression(), debug-location !15
+; CHECK: DBG_VALUE debug-use %{{[0-9]+}}(p0), 0, !14, !DIExpression(), 
debug-location !15
 define void @debug_declare_vla(i32 %in) #0 !dbg !13 {
 entry:
   %vla.addr = alloca i32, i32 %in

--- End Message ---
--- Begin Message ---
Source: llvm-toolchain-7
Source-Version: 1:7-8

We believe that the bug you reported is fixed in the latest version of
llvm-toolchain-7, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sylvestre Ledru <[email protected]> (supplier of updated llvm-toolchain-7 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 20 Oct 2018 16:00:58 +0200
Source: llvm-toolchain-7
Binary: clang-7 clang-tools-7 clang-format-7 clang-tidy-7 clang-7-doc 
libclang1-7 libclang-7-dev libclang-common-7-dev libfuzzer-7-dev python-clang-7 
clang-7-examples libllvm7 llvm-7 llvm-7-runtime llvm-7-dev llvm-7-tools 
libllvm-7-ocaml-dev llvm-7-doc llvm-7-examples lld-7 liblld-7 liblld-7-dev 
lldb-7 liblldb-7 python-lldb-7 liblldb-7-dev libomp-7-dev libomp5-7 
libomp-7-doc libc++1-7 libc++-7-dev libc++abi1-7 libc++abi-7-dev
Architecture: source
Version: 1:7-8
Distribution: unstable
Urgency: medium
Maintainer: LLVM Packaging Team <[email protected]>
Changed-By: Sylvestre Ledru <[email protected]>
Description:
 clang-7    - C, C++ and Objective-C compiler
 clang-7-doc - C, C++ and Objective-C compiler - Documentation
 clang-7-examples - Clang examples
 clang-format-7 - Tool to format C/C++/Obj-C code
 clang-tidy-7 - clang-based C++ linter tool
 clang-tools-7 - clang-based tools for C/C++ developments
 libc++-7-dev - LLVM C++ Standard library (development files)
 libc++1-7  - LLVM C++ Standard library
 libc++abi-7-dev - LLVM low level support for a standard C++ library 
(development fi
 libc++abi1-7 - LLVM low level support for a standard C++ library
 libclang-7-dev - clang library - Development package
 libclang-common-7-dev - clang library - Common development package
 libclang1-7 - C interface to the clang library
 libfuzzer-7-dev - Library for coverage-guided fuzz testing
 liblld-7   - LLVM-based linker, library
 liblld-7-dev - LLVM-based linker, header files
 liblldb-7  - Next generation, high-performance debugger, library
 liblldb-7-dev - Next generation, high-performance debugger, header files
 libllvm-7-ocaml-dev - Modular compiler and toolchain technologies, OCaml 
bindings
 libllvm7   - Modular compiler and toolchain technologies, runtime library
 libomp-7-dev - LLVM OpenMP runtime - dev package
 libomp-7-doc - LLVM OpenMP runtime - Documentation
 libomp5-7  - LLVM OpenMP runtime
 lld-7      - LLVM-based linker
 lldb-7     - Next generation, high-performance debugger
 llvm-7     - Modular compiler and toolchain technologies
 llvm-7-dev - Modular compiler and toolchain technologies, libraries and header
 llvm-7-doc - Modular compiler and toolchain technologies, documentation
 llvm-7-examples - Modular compiler and toolchain technologies, examples
 llvm-7-runtime - Modular compiler and toolchain technologies, IR interpreter
 llvm-7-tools - Modular compiler and toolchain technologies, tools
 python-clang-7 - Clang Python Bindings
 python-lldb-7 - Next generation, high-performance debugger, python lib
Closes: 753572 827866 889832 909705 912544
Changes:
 llvm-toolchain-7 (1:7-8) unstable; urgency=medium
 .
   * Update the watch file to display the right version
     (even if the download will fail)
   * clang-7 suggests libomp-7-dev instead of libomp-dev
   * Make sure that we don't conflict openmp & libc++ with llvm-defaults's
     (Closes: #912544)
   * Handle better the non coinstability of openmp & libc++ (like we are doing
     with python-clang-*)
   * Backport upstream fix D51749 to address a rust aarch64 issues
     (Closes: #909705)
   * Add tests from old bugs to make sure they don't come back
     (Closes: #889832, #827866)
   * The sanitizers use the versionned llvm-symbolizer provided by the
     llvm-X package (Closes: #753572)
Checksums-Sha1:
 432e431315e27e3f8195c00d829046525fd2b7ca 8127 llvm-toolchain-7_7-8.dsc
 c4d97aa2d59e1f70dba20da4e8a5ea205c00ffbf 84796 
llvm-toolchain-7_7-8.debian.tar.xz
 3b001eb1f3afaef505041763d9255b91cd870dfc 11701 
llvm-toolchain-7_7-8_source.buildinfo
Checksums-Sha256:
 194a3557856781533f97a5986d666a785a3b3a47a8368e2f028eeb08deff0811 8127 
llvm-toolchain-7_7-8.dsc
 f62b8de3f79f118d52e2c0a3c70d24547ea297eea397629ceb2849a2f7f3ffdc 84796 
llvm-toolchain-7_7-8.debian.tar.xz
 5c7a7acb59a5ae002683b33d1f4c454a3c59d64c2df932950c0bca7c7679dabb 11701 
llvm-toolchain-7_7-8_source.buildinfo
Files:
 6d43c709d7237a46ff0700563ccbb659 8127 devel optional llvm-toolchain-7_7-8.dsc
 ea5a6bc882c403d7e627fc19c86e2497 84796 devel optional 
llvm-toolchain-7_7-8.debian.tar.xz
 7bcf4c2215d0a5a60615933aa51f4a23 11701 devel optional 
llvm-toolchain-7_7-8_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEtg21mU05vsTRqVzPfmUo2nUvG+EFAlvbVkMVHHN5bHZlc3Ry
ZUBkZWJpYW4ub3JnAAoJEH5lKNp1LxvhqGgP/Ru3eUnv/xCZBS0qGlT/smYHW72F
XCPJSJMBMmXY5o13Q+i5fEwQ0zStbUAQXZfjtsw7Gn8Q7SZY3ViEAiUpRsfYGGay
mBlH5pAa0lKepyXVc95iLqRDWqxlaZg2uWzbrCIFDTsE1zI9j40fal+NTXRazbgq
kNvx26FhZZ1gwaGznfJpojDwn2zJg51N477tCNaulqBHcIpD6HzazED2+qZnrWv5
bJDuJKyErTI8VEzacWcAyei/ganaQNZlwlG6ZfN8n9W+J6qzVuruU+Q0jxpS7Uzb
VZrqV5/GNE7dKMYsy5IiBuAlTPgXbBCaBOq5R5VhpYvE5lhHCruK8ptiB7tLAN8Q
JfBiCxHzkKHqhj7XZMaZXTVw+5zbG4p6i/iUZwKgZazFULve3LDyGHRI1xqiG85L
t1NPyODlagX3yjT9BDVQPTLryQwMsa5oNBYUm3wLMy5VORktIR9bS5BQeYDisSV6
/T62Uy1+Zcju9/XSQkQ6uaFRdcbGpQDa2C+6Qns98EjqCwov22IlKHMqyhiroaqx
hk0bUvWlfkvzryNZKuZ8H00d4a9QsXCtHhQLqMfD7KWVPR7eYOipUklJEAAaSlES
LyzsVqmRF6Vzk1Wma5zqVpX3MrfXok/+51iTLfPjfse5aNysaGacBS11+4FbtAp2
nUnO+2UF1wzzubTO
=UcOw
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to