SHA256
1
0
forked from pool/llvm

- Update to version 3.3

* 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/package/show/devel:tools:compiler/llvm?expand=0&rev=208
This commit is contained in:
Ismail Dönmez 2013-05-08 09:19:05 +00:00 committed by Git OBS Bridge
parent fe2dcd332e
commit e293185ec8
9 changed files with 48 additions and 231 deletions

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)
--- 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.
- CPUName = isAndroid ? "core2" : "pentium4";
+ // denominator. This makes a better choice than i586.
+ CPUName = isAndroid ? "core2" : "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,

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80acfe4f0a795975cb8a1c71a5947f484c462e1c492ce5115cb5db6bb1901ede
size 24887479

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed May 8 08:56:28 UTC 2013 - idonmez@suse.com
- Update to version 3.3
* 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,12 +16,12 @@
#
%define _revision 170558
%define _release_version 3.2
%define _revision 181396
%define _release_version 3.3
%define _supported_archs "arm,powerpc,x86"
Name: llvm
Version: 3.2
Version: 3.3
Release: 0
Summary: Low Level Virtual Machine
License: NCSA
@ -42,12 +42,6 @@ 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
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -130,7 +124,7 @@ Requires: vim
This package contains vim plugins for LLVM like syntax highlighting.
%prep
%setup -q -n %{name}
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
@ -144,10 +138,6 @@ This package contains vim plugins for LLVM like syntax highlighting.
%ifarch armv7l armv7hl
%patch7 -p0
%endif
%patch8 -p1
%patch9 -p0
%patch10 -p0
%patch11 -p1
# We hardcode i586
rm tools/clang/test/Driver/x86_features.c

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