Accepting request 176364 from devel:tools:compiler

- Update to version 3.3 RC2
  * Small bugfixes

- Enable ARM64 support

- Add unreachable-code.patch to fix unreachable code warnings on SLE 

- Update to version 3.3 RC1
    * Added support for AArch64, ARM’s 64-bit architecture.
    * LLVM now has a new SLP vectorizer.
    * LLVM and clang now support IBM’s z/Architecture.
    * The R600 backend was added in this release, it supports
      AMD GPUs (HD2XXX - HD7XXX).
    * See http://llvm.org/releases/3.3/docs/ReleaseNotes.html for
      complete changelog.
- Drop upstream patches:
    * pr13303.patch
    * pr14795.patch
    * pr14831.patch
    * python-ulimit.patch

OBS-URL: https://build.opensuse.org/request/show/176364
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=43
This commit is contained in:
Stephan Kulow 2013-05-27 07:53:47 +00:00 committed by Git OBS Bridge
commit d61b5bf599
12 changed files with 93 additions and 237 deletions

9
_constraints Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<constraints>
<hardware>
<memory>
<size unit="M">2000</size>
</memory>
</hardware>
<sandbox>kvm</sandbox>
</constraints>

View File

@ -1,13 +1,11 @@
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp
@@ -1840,7 +1840,7 @@ static bool IsRedhat(enum LinuxDistro Di
--- a/tools/clang/lib/Driver/ToolChains.cpp (revision 178453)
+++ b/tools/clang/lib/Driver/ToolChains.cpp (working copy)
@@ -1878,7 +1878,7 @@
}
static bool IsOpenSuse(enum LinuxDistro Distro) {
static bool IsOpenSuse(enum Distro Distro) {
- return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_2;
+ return true;
}
static bool IsDebian(enum LinuxDistro Distro) {
static bool IsDebian(enum Distro Distro) {

View File

@ -1,15 +1,20 @@
Index: llvm/tools/clang/lib/Driver/Tools.cpp
Index: llvm-3.3/tools/clang/lib/Driver/Tools.cpp
===================================================================
--- llvm.orig/tools/clang/lib/Driver/Tools.cpp
+++ llvm/tools/clang/lib/Driver/Tools.cpp
@@ -1178,8 +1178,8 @@ void Clang::AddX86TargetArgs(const ArgLi
CPUName = "x86-64";
else if (getToolChain().getArch() == llvm::Triple::x86)
// All x86 devices running Android have core2 as their common
- // denominator. This makes a better choice than pentium4.
- CPUName = isAndroid ? "core2" : "pentium4";
+ // denominator. This makes a better choice than i586.
+ CPUName = isAndroid ? "core2" : "i586";
}
}
--- llvm-3.3.orig/tools/clang/lib/Driver/Tools.cpp
+++ llvm-3.3/tools/clang/lib/Driver/Tools.cpp
@@ -1243,12 +1243,12 @@ static const char *getX86TargetCPU(const
if (Triple.getOSName().startswith("netbsd"))
return "i486";
// All x86 devices running Android have core2 as their common
- // denominator. This makes a better choice than pentium4.
+ // denominator. This makes a better choice than i586.
if (Triple.getEnvironment() == llvm::Triple::Android)
return "core2";
- // Fallback to p4.
- return "pentium4";
+ // Fallback to i586.
+ return "i586";
}
void Clang::AddX86TargetArgs(const ArgList &Args,

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9438b98fdd9739fbceec5f6dd852fc0b1c99b78513e27f453b8d8647059a76b4
size 19632648

3
llvm-3.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0238f2896e6236560a70722256ab48a4862a6f287a213ad0278f35dde0725a88
size 24941173

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Tue May 21 09:46:02 UTC 2013 - idonmez@suse.com
- Update to version 3.3 RC2
* Small bugfixes
-------------------------------------------------------------------
Tue May 14 11:23:07 UTC 2013 - idonmez@suse.com
- Enable ARM64 support
-------------------------------------------------------------------
Thu May 9 09:05:41 UTC 2013 - idonmez@suse.com
- Add unreachable-code.patch to fix unreachable code warnings on SLE
-------------------------------------------------------------------
Wed May 8 08:56:28 UTC 2013 - idonmez@suse.com
- Update to version 3.3 RC1
* Added support for AArch64, ARMs 64-bit architecture.
* LLVM now has a new SLP vectorizer.
* LLVM and clang now support IBMs z/Architecture.
* The R600 backend was added in this release, it supports
AMD GPUs (HD2XXX - HD7XXX).
* See http://llvm.org/releases/3.3/docs/ReleaseNotes.html for
complete changelog.
- Drop upstream patches:
* pr13303.patch
* pr14795.patch
* pr14831.patch
* python-ulimit.patch
-------------------------------------------------------------------
Wed Jan 16 18:38:01 UTC 2013 - llunak@suse.com

View File

@ -16,18 +16,18 @@
#
%define _revision 170558
%define _release_version 3.2
%define _supported_archs "arm,powerpc,x86"
%define _revision 182457
%define _release_version 3.3
%define _supported_archs "arm,aarch64,powerpc,x86"
Name: llvm
Version: 3.2
Version: 3.2.91
Release: 0
Summary: Low Level Virtual Machine
License: NCSA
Group: Development/Languages/Other
Url: http://www.llvm.org
Source0: %{name}-%{version}.tar.bz2
Source0: %{name}-%{_release_version}.tar.bz2
Source100: %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
Patch1: set-revision.patch
@ -42,12 +42,8 @@ Patch5: llvm-config-lib64.patch
Patch6: arm_suse_support.diff
# PATCH-FIX-OPENSUSE disable_neon_in_armv7.diff -- Disable use of neon in armv7 openSUSE
Patch7: disable_neon_in_armv7.diff
# PATCH-FIX-UPSTREAM python-ulimit.patch Upstream r169695
Patch8: python-ulimit.patch
Patch9: pr14795.patch
Patch10: pr14831.patch
# PATCH-FIX-UPSTREAM pr13303.patch
Patch11: pr13303.patch
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE
Patch8: unreachable-code.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -130,7 +126,7 @@ Requires: vim
This package contains vim plugins for LLVM like syntax highlighting.
%prep
%setup -q -n %{name}
%setup -q -n %{name}-%{_release_version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
@ -145,9 +141,6 @@ This package contains vim plugins for LLVM like syntax highlighting.
%patch7 -p0
%endif
%patch8 -p1
%patch9 -p0
%patch10 -p0
%patch11 -p1
# We hardcode i586
rm tools/clang/test/Driver/x86_features.c
@ -161,10 +154,10 @@ sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
# Nasty hardcoded path
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp tools/clang/test/Preprocessor/iwithprefix.c
# Only enable target archs otherwise llvm-config is messed up
sed -i s,"subdirectories = .*","subdirectories = ARM PowerPC X86", lib/Target/LLVMBuild.txt
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC X86", lib/Target/LLVMBuild.txt
sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
echo > utils/unittest/LLVMBuild.txt
@ -398,6 +391,7 @@ rm %{buildroot}%{_libdir}/LLVMHello.*
%{_bindir}/clang
%{_bindir}/clang-*
%{_bindir}/clang++
%{_bindir}/clang-format
%{_bindir}/c-index-test
%{_bindir}/ccc-analyzer
%{_bindir}/c++-analyzer

View File

@ -1,68 +0,0 @@
commit b36c531653913cdea211a25d45350e8b5bfbd262
Author: David Blaikie <dblaikie@gmail.com>
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]

View File

@ -1,76 +0,0 @@
From 6be9a72888dd0ed22f53c5d46773aa188c0873c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@suse.cz>
Date: Fri, 4 Jan 2013 21:10:49 +0100
Subject: [PATCH] fix line info in -frewrite-includes after skipped #if block
---
lib/Rewrite/Frontend/InclusionRewriter.cpp | 20 +++++++++++++++++++-
test/Frontend/rewrite-includes.c | 2 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/lib/Rewrite/Frontend/InclusionRewriter.cpp b/lib/Rewrite/Frontend/InclusionRewriter.cpp
index 9d1bec9..91dabcc 100644
--- tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
+++ tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
@@ -275,14 +275,21 @@ bool InclusionRewriter::Process(FileID FileId,
// TODO: Consider adding a switch that strips possibly unimportant content,
// such as comments, to reduce the size of repro files.
+ bool NeedLineInfo = false;
while (RawToken.isNot(tok::eof)) {
+ if (RawToken.isAtStartOfLine() && NeedLineInfo) {
+ OutputContentUpTo(FromFile, NextToWrite,
+ SM.getFileOffset(RawToken.getLocation()), EOL, Line);
+ WriteLineInfo(FileName, Line, FileType, EOL);
+ NeedLineInfo = false;
+ }
if (RawToken.is(tok::hash) && RawToken.isAtStartOfLine()) {
RawLex.setParsingPreprocessorDirective(true);
Token HashToken = RawToken;
RawLex.LexFromRawLexer(RawToken);
if (RawToken.is(tok::raw_identifier))
PP.LookUpIdentifierInfo(RawToken);
- if (RawToken.is(tok::identifier)) {
+ if (RawToken.getIdentifierInfo() != NULL) {
switch (RawToken.getIdentifierInfo()->getPPKeywordID()) {
case tok::pp_include:
case tok::pp_include_next:
@@ -323,6 +330,17 @@ bool InclusionRewriter::Process(FileID FileId,
}
break;
}
+ case tok::pp_endif:
+ case tok::pp_elif:
+ case tok::pp_else: {
+ // We surround every #include by #if 0 to comment it out, but that
+ // changes line numbers. These are fixed up right after that, but
+ // the whole #include could be inside a preprocessor conditional
+ // that is not processed. So it is necessary to fix the line
+ // numbers one the next line after each #else/#endif as well.
+ NeedLineInfo = true;
+ break;
+ }
default:
break;
}
diff --git a/test/Frontend/rewrite-includes.c b/test/Frontend/rewrite-includes.c
index 546a2c4..f2f929c 100644
--- tools/clang/test/Frontend/rewrite-includes.c
+++ tools/clang/test/Frontend/rewrite-includes.c
@@ -47,11 +47,13 @@ A(1,2)
// CHECK-NEXT: {{^}}included_line3{{$}}
// CHECK-NEXT: {{^}}# 10 "{{.*}}rewrite-includes.c" 2{{$}}
// CHECK-NEXT: {{^}}#else{{$}}
+// CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 13 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
// CHECK-NEXT: {{^}} {{$}}
--
1.7.10.4

View File

@ -1,39 +0,0 @@
From 08c9add28c1a5b3c80b910d268a2f0a9f4d72995 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@suse.cz>
Date: Mon, 7 Jan 2013 12:37:28 +0100
Subject: [PATCH] do not warn about "unknown" pragmas in -frewrite-includes
(pr#14831)
---
lib/Rewrite/Frontend/InclusionRewriter.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/Rewrite/Frontend/InclusionRewriter.cpp b/lib/Rewrite/Frontend/InclusionRewriter.cpp
index 9d1bec9..dad15fa 100644
--- tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
+++ tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "clang/Rewrite/Frontend/Rewriters.h"
+#include "clang/Lex/Pragma.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
@@ -344,6 +345,13 @@ void clang::RewriteIncludesInInput(Preprocessor &PP, raw_ostream *OS,
InclusionRewriter *Rewrite = new InclusionRewriter(PP, *OS,
Opts.ShowLineMarkers);
PP.addPPCallbacks(Rewrite);
+ // Ignore all pragmas, otherwise there will be warnings about unknown pragmas
+ // (because there's nothing to handle them).
+ PP.AddPragmaHandler(new EmptyPragmaHandler());
+ // Ignore also all pragma in all namespaces created
+ // in Preprocessor::RegisterBuiltinPragmas().
+ PP.AddPragmaHandler("GCC",new EmptyPragmaHandler());
+ PP.AddPragmaHandler("clang",new EmptyPragmaHandler());
// First let the preprocessor process the entire file and call callbacks.
// Callbacks will record which #include's were actually performed.
--
1.7.10.4

View File

@ -1,14 +0,0 @@
Index: llvm/test/Makefile
===================================================================
--- llvm.orig/test/Makefile
+++ llvm/test/Makefile
@@ -78,8 +78,7 @@ else # !SunOS
ifeq ($(HOST_OS),AuroraUX)
ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -v 512000 ;
else # !AuroraUX
-# Fedora 13 x86-64 python fails with -v 76800
-ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -v 1024000 ;
+ULIMIT=ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ;
endif # AuroraUX
endif # SunOS

13
unreachable-code.patch Normal file
View File

@ -0,0 +1,13 @@
Index: llvm/utils/TableGen/CodeGenInstruction.cpp
===================================================================
--- llvm.orig/utils/TableGen/CodeGenInstruction.cpp
+++ llvm/utils/TableGen/CodeGenInstruction.cpp
@@ -191,7 +191,7 @@ CGIOperandList::ParseOperandName(const s
return std::make_pair(OpIdx, i);
// Otherwise, didn't find it!
- PrintFatalError(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
+ llvm_unreachable(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
}
static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) {