From 076e44a2b7cf8b1a63ffdfcdeea5095b8a5ee78b08a14bf9df6a94f0c3d63574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 17 Jan 2013 10:11:47 +0000 Subject: [PATCH] Accepting request 148801 from home:llunak:branches:devel:tools:compiler pr13303 fix was temporarily reverted upstream and is not in 3.2 OBS-URL: https://build.opensuse.org/request/show/148801 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=205 --- llvm.changes | 5 ++++ llvm.spec | 3 +++ pr13303.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 pr13303.patch diff --git a/llvm.changes b/llvm.changes index 70ea502..d497f9c 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 16 18:38:01 UTC 2013 - llunak@suse.com + +- pr13303.patch: reapply, was temporarily reverted upstream + ------------------------------------------------------------------- Fri Jan 11 11:56:09 UTC 2013 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index e7024c4..94236df 100644 --- a/llvm.spec +++ b/llvm.spec @@ -46,6 +46,8 @@ Patch7: disable_neon_in_armv7.diff Patch8: python-ulimit.patch Patch9: pr14795.patch Patch10: pr14831.patch +# PATCH-FIX-UPSTREAM pr13303.patch +Patch11: pr13303.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -145,6 +147,7 @@ This package contains vim plugins for LLVM like syntax highlighting. %patch8 -p1 %patch9 -p0 %patch10 -p0 +%patch11 -p1 # We hardcode i586 rm tools/clang/test/Driver/x86_features.c diff --git a/pr13303.patch b/pr13303.patch new file mode 100644 index 0000000..fb9cca6 --- /dev/null +++ b/pr13303.patch @@ -0,0 +1,68 @@ +commit b36c531653913cdea211a25d45350e8b5bfbd262 +Author: David Blaikie +Date: Tue Dec 4 21:05:36 2012 +0000 + + Reapply r160148 (reverted in r163570) fixing spurious breakpoints in modern GDB + + This reapplies the fix for PR13303 now with more justification. Based on my + execution of the GDB 7.5 test suite this results in: + + expected passes: 16101 -> 20890 (+30%) + unexpected failures: 4826 -> 637 (-77%) + + There are 23 checks that used to pass and now fail. They are all in + gdb.reverse. Investigating a few looks like they were accidentally passing + due to extra breakpoints being set by this bug. They're generally due to the + difference in end location between gcc and clang, the test suite is trying to + set breakpoints on the closing '}' that clang doesn't associate with any + instructions. + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169304 91177308-0d34-0410-b5e6-96231b3b80d8 + +diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +index d008f0b..3276575 100644 +--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ++++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +@@ -1511,7 +1511,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { + MF->getFunction()->getContext()); + recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(), + FnStartDL.getScope(MF->getFunction()->getContext()), +- 0); ++ DWARF2_FLAG_IS_STMT); + } + } + +diff --git a/test/DebugInfo/X86/pr13303.ll b/test/DebugInfo/X86/pr13303.ll +new file mode 100644 +index 0000000..e820cb5 +--- /dev/null ++++ b/test/DebugInfo/X86/pr13303.ll +@@ -0,0 +1,28 @@ ++; RUN: llc %s -o %t -filetype=obj -mtriple=x86_64-unknown-linux-gnu ++; RUN: llvm-dwarfdump %t | FileCheck %s ++; PR13303 ++ ++; Check that the prologue ends with is_stmt here. ++; CHECK: 0x0000000000000000 {{.*}} is_stmt ++ ++define i32 @main() nounwind uwtable { ++entry: ++ %retval = alloca i32, align 4 ++ store i32 0, i32* %retval ++ ret i32 0, !dbg !10 ++} ++ ++!llvm.dbg.cu = !{!0} ++ ++!0 = metadata !{i32 786449, i32 0, i32 12, metadata !"PR13303.c", metadata !"/home/probinson", metadata !"clang version 3.2 (trunk 160143)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ] [/home/probinson/PR13303.c] [DW_LANG_C99] ++!1 = metadata !{metadata !2} ++!2 = metadata !{i32 0} ++!3 = metadata !{metadata !4} ++!4 = metadata !{metadata !5} ++!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"main", metadata !"main", metadata !"", metadata !6, i32 1, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false, i32 ()* @main, null, null, metadata !1, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [main] ++!6 = metadata !{i32 786473, metadata !"PR13303.c", metadata !"/home/probinson", null} ; [ DW_TAG_file_type ] ++!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] ++!8 = metadata !{metadata !9} ++!9 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] ++!10 = metadata !{i32 1, i32 14, metadata !11, null} ++!11 = metadata !{i32 786443, metadata !5, i32 1, i32 12, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] [/home/probinson/PR13303.c]