Accepting request 114318 from devel:tools:compiler
- Update to svn revision 154914 from 3.1 branch Major new features: * AddressSanitizer, a fast memory error detector. * MachineInstr Bundles, Support to model instruction bundling / packing. * ARM Integrated Assembler, A full featured assembler and direct-to-object support for ARM. * Basic Block Placement Probability driven basic block placement. LLVM IR and Core Improvements * IR support for half float * IR support for vectors of pointers, including vector GEPs. * Module flags have been introduced. * Loads can now have range metadata attached to them to describe the possible values being loaded. * Inline cost heuristics have been completely overhauled and now closely model constant propagation through call sites, disregard trivially dead code costs, and can model C++ STL iterator patterns. Optimizer Improvements * The loop unroll pass now is able to unroll loops with run-time trip counts. This feature is turned off by default, and is enabled with the -unroll-runtime flag. * A new basic-block autovectorization pass is available. Pass -vectorize to run this pass along with some associated post-vectorization cleanup passes. X86-32 and X86-64 Target Improvements * Bug fixes and improved support for AVX1 OBS-URL: https://build.opensuse.org/request/show/114318 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=24
This commit is contained in:
commit
e582afe6f1
@ -1,11 +1,12 @@
|
||||
--- tools/clang/lib/Driver/ToolChains.cpp 2011-08-12 11:19:35.000000000 +0200
|
||||
+++ tools/clang/lib/Driver/ToolChains.cpp 2011-08-12 12:10:47.733446958 +0200
|
||||
@@ -1346,8 +1346,7 @@
|
||||
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
|
||||
}
|
||||
|
||||
static bool IsOpenSuse(enum LinuxDistro Distro) {
|
||||
- return Distro == OpenSuse11_3 || Distro == OpenSuse11_4 ||
|
||||
- Distro == OpenSuse12_1;
|
||||
- return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_1;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
21
clang-fix-mips-test.patch
Normal file
21
clang-fix-mips-test.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: llvm/tools/clang/test/Driver/linux-ld.c
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/test/Driver/linux-ld.c
|
||||
+++ llvm/tools/clang/test/Driver/linux-ld.c
|
||||
@@ -194,14 +194,14 @@
|
||||
// RUN: | FileCheck --check-prefix=CHECK-MIPS %s
|
||||
// CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
|
||||
// CHECK-MIPS: "-m" "elf32btsmip"
|
||||
-// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
||||
+// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
|
||||
// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
|
||||
// RUN: %clang %s -### -o %t.o 2>&1 \
|
||||
// RUN: -target mipsel-linux-gnu -ccc-clang-archs mipsel \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s
|
||||
// CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
|
||||
// CHECK-MIPSEL: "-m" "elf32ltsmip"
|
||||
-// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
||||
+// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
|
||||
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
|
||||
// RUN: %clang %s -### -o %t.o 2>&1 \
|
||||
// RUN: -target mips64-linux-gnu -ccc-clang-archs mips64 \
|
@ -1,134 +0,0 @@
|
||||
Index: test/CodeGen/pr9614.c
|
||||
===================================================================
|
||||
--- test/CodeGen/pr9614.c (revision 146866)
|
||||
+++ test/CodeGen/pr9614.c (revision 146867)
|
||||
@@ -1,4 +1,4 @@
|
||||
-// RUN: %clang_cc1 -emit-llvm %s -O1 -o - | FileCheck %s
|
||||
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
||||
|
||||
extern void foo_alias (void) __asm ("foo");
|
||||
inline void foo (void) {
|
||||
@@ -8,15 +8,22 @@
|
||||
inline __attribute__ ((__always_inline__)) void bar (void) {
|
||||
return bar_alias ();
|
||||
}
|
||||
+extern char *strrchr_foo (const char *__s, int __c) __asm ("strrchr");
|
||||
+extern inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c) {
|
||||
+ return __builtin_strrchr (__s, __c);
|
||||
+}
|
||||
void f(void) {
|
||||
foo();
|
||||
bar();
|
||||
+ strrchr_foo("", '.');
|
||||
}
|
||||
|
||||
// CHECK: define void @f()
|
||||
// CHECK: call void @foo()
|
||||
// CHECK-NEXT: call void @bar()
|
||||
+// CHECK-NEXT: call i8* @strrchr(
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
// CHECK: declare void @foo()
|
||||
// CHECK: declare void @bar()
|
||||
+// CHECK: declare i8* @strrchr(i8*, i32)
|
||||
Index: lib/CodeGen/CodeGenModule.h
|
||||
===================================================================
|
||||
--- lib/CodeGen/CodeGenModule.h (revision 146866)
|
||||
+++ lib/CodeGen/CodeGenModule.h (revision 146867)
|
||||
@@ -323,7 +323,7 @@
|
||||
void createOpenCLRuntime();
|
||||
void createCUDARuntime();
|
||||
|
||||
- bool isTriviallyRecursiveViaAsm(const FunctionDecl *F);
|
||||
+ bool isTriviallyRecursive(const FunctionDecl *F);
|
||||
bool shouldEmitFunction(const FunctionDecl *F);
|
||||
llvm::LLVMContext &VMContext;
|
||||
|
||||
Index: lib/CodeGen/CodeGenModule.cpp
|
||||
===================================================================
|
||||
--- lib/CodeGen/CodeGenModule.cpp (revision 146866)
|
||||
+++ lib/CodeGen/CodeGenModule.cpp (revision 146867)
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "clang/AST/Mangle.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/AST/RecursiveASTVisitor.h"
|
||||
+#include "clang/Basic/Builtins.h"
|
||||
#include "clang/Basic/Diagnostic.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
@@ -863,20 +864,27 @@
|
||||
struct FunctionIsDirectlyRecursive :
|
||||
public RecursiveASTVisitor<FunctionIsDirectlyRecursive> {
|
||||
const StringRef Name;
|
||||
+ const Builtin::Context &BI;
|
||||
bool Result;
|
||||
- FunctionIsDirectlyRecursive(const FunctionDecl *F) :
|
||||
- Name(F->getName()), Result(false) {
|
||||
+ FunctionIsDirectlyRecursive(StringRef N, const Builtin::Context &C) :
|
||||
+ Name(N), BI(C), Result(false) {
|
||||
}
|
||||
typedef RecursiveASTVisitor<FunctionIsDirectlyRecursive> Base;
|
||||
|
||||
bool TraverseCallExpr(CallExpr *E) {
|
||||
- const Decl *D = E->getCalleeDecl();
|
||||
- if (!D)
|
||||
+ const FunctionDecl *FD = E->getDirectCallee();
|
||||
+ if (!FD)
|
||||
return true;
|
||||
- AsmLabelAttr *Attr = D->getAttr<AsmLabelAttr>();
|
||||
- if (!Attr)
|
||||
+ AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
|
||||
+ if (Attr && Name == Attr->getLabel()) {
|
||||
+ Result = true;
|
||||
+ return false;
|
||||
+ }
|
||||
+ unsigned BuiltinID = FD->getBuiltinID();
|
||||
+ if (!BuiltinID)
|
||||
return true;
|
||||
- if (Name == Attr->getLabel()) {
|
||||
+ const char *BuiltinName = BI.GetName(BuiltinID) + strlen("__builtin_");
|
||||
+ if (Name == BuiltinName) {
|
||||
Result = true;
|
||||
return false;
|
||||
}
|
||||
@@ -885,15 +893,24 @@
|
||||
};
|
||||
}
|
||||
|
||||
-// isTriviallyRecursiveViaAsm - Check if this function calls another
|
||||
-// decl that, because of the asm attribute, ends up pointing to itself.
|
||||
+// isTriviallyRecursive - Check if this function calls another
|
||||
+// decl that, because of the asm attribute or the other decl being a builtin,
|
||||
+// ends up pointing to itself.
|
||||
bool
|
||||
-CodeGenModule::isTriviallyRecursiveViaAsm(const FunctionDecl *F) {
|
||||
- if (getCXXABI().getMangleContext().shouldMangleDeclName(F))
|
||||
- return false;
|
||||
+CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) {
|
||||
+ StringRef Name;
|
||||
+ if (getCXXABI().getMangleContext().shouldMangleDeclName(FD)) {
|
||||
+ // asm labels are a special king of mangling we have to support.
|
||||
+ AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
|
||||
+ if (!Attr)
|
||||
+ return false;
|
||||
+ Name = Attr->getLabel();
|
||||
+ } else {
|
||||
+ Name = FD->getName();
|
||||
+ }
|
||||
|
||||
- FunctionIsDirectlyRecursive Walker(F);
|
||||
- Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(F));
|
||||
+ FunctionIsDirectlyRecursive Walker(Name, Context.BuiltinInfo);
|
||||
+ Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(FD));
|
||||
return Walker.Result;
|
||||
}
|
||||
|
||||
@@ -909,7 +926,7 @@
|
||||
// but a function that calls itself is clearly not equivalent to the real
|
||||
// implementation.
|
||||
// This happens in glibc's btowc and in some configure checks.
|
||||
- return !isTriviallyRecursiveViaAsm(F);
|
||||
+ return !isTriviallyRecursive(F);
|
||||
}
|
||||
|
||||
void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
|
@ -1,31 +0,0 @@
|
||||
Index: test/CodeGenCXX/visibility-inlines-hidden.cpp
|
||||
===================================================================
|
||||
--- test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147294)
|
||||
+++ test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147295)
|
||||
@@ -97,3 +97,14 @@
|
||||
|
||||
// CHECK: define available_externally void @_ZN5test22ns3fooINS_1BINS_1AEEEEEvv()
|
||||
}
|
||||
+
|
||||
+namespace PR11642 {
|
||||
+ template <typename T>
|
||||
+ class Foo {
|
||||
+ public:
|
||||
+ T foo(T x) { return x; }
|
||||
+ };
|
||||
+ extern template class Foo<int>;
|
||||
+ template class Foo<int>;
|
||||
+ // CHECK: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi
|
||||
+}
|
||||
Index: lib/AST/Decl.cpp
|
||||
===================================================================
|
||||
--- lib/AST/Decl.cpp (revision 147294)
|
||||
+++ lib/AST/Decl.cpp (revision 147295)
|
||||
@@ -568,6 +568,7 @@
|
||||
// about whether containing classes have visibility attributes,
|
||||
// and that's intentional.
|
||||
if (TSK != TSK_ExplicitInstantiationDeclaration &&
|
||||
+ TSK != TSK_ExplicitInstantiationDefinition &&
|
||||
F.ConsiderGlobalVisibility &&
|
||||
MD->getASTContext().getLangOptions().InlineVisibilityHidden) {
|
||||
// InlineVisibilityHidden only applies to definitions, and
|
3
llvm-3.0.99+svn154914.tar.bz2
Normal file
3
llvm-3.0.99+svn154914.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:af9ae518982b9385f4bceae48eafcf1ffb309bbd2422a5a95aa1df00f0d216aa
|
||||
size 16144645
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d9486d9f956ceb8002377406368ad871f41ce01e95ba3b735757df4beaaa3374
|
||||
size 13988408
|
65
llvm.changes
65
llvm.changes
@ -1,3 +1,68 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 17 07:48:50 UTC 2012 - idonmez@suse.com
|
||||
|
||||
- Update to svn revision 154914 from 3.1 branch
|
||||
|
||||
Major new features:
|
||||
|
||||
* AddressSanitizer, a fast memory error detector.
|
||||
* MachineInstr Bundles, Support to model instruction
|
||||
bundling / packing.
|
||||
* ARM Integrated Assembler, A full featured assembler
|
||||
and direct-to-object support for ARM.
|
||||
* Basic Block Placement Probability driven basic block placement.
|
||||
|
||||
LLVM IR and Core Improvements
|
||||
|
||||
* IR support for half float
|
||||
* IR support for vectors of pointers, including vector GEPs.
|
||||
* Module flags have been introduced.
|
||||
* Loads can now have range metadata attached to them to
|
||||
describe the possible values being loaded.
|
||||
* Inline cost heuristics have been completely overhauled
|
||||
and now closely model constant propagation through call sites,
|
||||
disregard trivially dead code costs, and
|
||||
can model C++ STL iterator patterns.
|
||||
|
||||
Optimizer Improvements
|
||||
|
||||
* The loop unroll pass now is able to unroll loops with
|
||||
run-time trip counts. This feature is turned off by default,
|
||||
and is enabled with the -unroll-runtime flag.
|
||||
* A new basic-block autovectorization pass is available.
|
||||
Pass -vectorize to run this pass along with some associated
|
||||
post-vectorization cleanup passes.
|
||||
|
||||
X86-32 and X86-64 Target Improvements
|
||||
|
||||
* Bug fixes and improved support for AVX1
|
||||
* Support for AVX2 (still incomplete at this point)
|
||||
|
||||
ARM Target Improvements
|
||||
|
||||
* The constant island pass now supports basic block and
|
||||
constant pool entry alignments greater than 4 bytes.
|
||||
|
||||
Clang Changes
|
||||
|
||||
* New: -Wdangling-else, -Wstrncat-size
|
||||
* Improved: -Wformat, -Wempty-body, -Wliteral-conversion
|
||||
* Clang 3.1 adds support for anonymous structs and anonymous unions,
|
||||
added in the latest ISO C standard. Use -std=c11 or -std=gnu11
|
||||
to enable support for the new language standard.
|
||||
The new C11 features are backwards-compatible and are available
|
||||
as an extension in all language modes.
|
||||
* All warning and language selection flags which previously accepted
|
||||
c1x have been updated to accept c11. The old c1x forms have been removed.
|
||||
* Generalized constant expressions
|
||||
* Lambda expressions
|
||||
* Generalized initializers
|
||||
* Unrestricted unions
|
||||
* User-defined literals
|
||||
* Forward-declared enumerations
|
||||
* Atomics (both libc++'s and libstdc++4.7's <atomic> are supported)
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 20 12:40:27 UTC 2012 - idonmez@suse.com
|
||||
|
||||
|
72
llvm.spec
72
llvm.spec
@ -16,12 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%define _revision 145598
|
||||
%define _release_version 3.0
|
||||
%define _revision 154914
|
||||
%define _release_version 3.1
|
||||
%define _supported_archs "arm,x86"
|
||||
|
||||
Name: llvm
|
||||
Version: 3.0
|
||||
Version: 3.0.99+svn154914
|
||||
Release: 0
|
||||
Summary: Low Level Virtual Machine
|
||||
License: NCSA
|
||||
@ -32,15 +32,12 @@ Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
||||
Patch1: set-revision.patch
|
||||
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
||||
Patch3: assume-opensuse.patch
|
||||
# PATCH-FIX-UPSTREAM clang-glibc2.14.patch idoenmez@suse.de -- Support glibc 2.14 headers
|
||||
Patch4: clang-glibc2.14.patch
|
||||
Patch2: assume-opensuse.patch
|
||||
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files
|
||||
Patch5: clang-disable-ada-extension.patch
|
||||
# PATCH-FIX-UPSTREAM http://llvm.org/viewvc/llvm-project?view=rev&revision=147295
|
||||
Patch6: clang-pr11642.patch
|
||||
Patch3: clang-disable-ada-extension.patch
|
||||
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
||||
Patch7: default-to-i586.patch
|
||||
Patch4: default-to-i586.patch
|
||||
Patch5: clang-fix-mips-test.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -49,15 +46,16 @@ BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: dejagnu
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
%ifarch x86_64
|
||||
# For tests
|
||||
BuildRequires: glibc-devel-32bit
|
||||
%endif
|
||||
BuildRequires: libtool
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: tcl-devel
|
||||
BuildRequires: tk-devel
|
||||
BuildRequires: python
|
||||
|
||||
# Code10 does not have libffi
|
||||
%if 0%{?suse_version} > 1100
|
||||
@ -130,20 +128,23 @@ Requires: vim
|
||||
This package contains vim plugins for LLVM like syntax highlighting.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch3
|
||||
cd tools/clang
|
||||
%patch4
|
||||
%patch6
|
||||
cd ../..
|
||||
%setup -q -n %{name}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%ifarch x86_64
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%endif
|
||||
|
||||
# We hardcode i586
|
||||
rm tools/clang/test/Driver/x86_features.c
|
||||
|
||||
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
|
||||
|
||||
# FIXME
|
||||
rm -rf projects/compiler_rt
|
||||
|
||||
# Nasty hardcoded path
|
||||
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp
|
||||
@ -347,31 +348,8 @@ rm -f %{buildroot}%{_libdir}/libEnhancedDisassembly.*
|
||||
%dir %{_libdir}/clang
|
||||
%dir %{_libdir}/clang/*
|
||||
%dir %{_libdir}/clang/*/include
|
||||
%{_libdir}/clang/*/include/altivec.h
|
||||
%{_libdir}/clang/*/include/arm_neon.h
|
||||
%{_libdir}/clang/*/include/avxintrin.h
|
||||
%{_libdir}/clang/*/include/emmintrin.h
|
||||
%{_libdir}/clang/*/include/float.h
|
||||
%{_libdir}/clang/*/include/immintrin.h
|
||||
%{_libdir}/clang/*/include/iso646.h
|
||||
%{_libdir}/clang/*/include/limits.h
|
||||
%{_libdir}/clang/*/include/mm_malloc.h
|
||||
%{_libdir}/clang/*/include/mmintrin.h
|
||||
%{_libdir}/clang/*/include/nmmintrin.h
|
||||
%{_libdir}/clang/*/include/pmmintrin.h
|
||||
%{_libdir}/clang/*/include/smmintrin.h
|
||||
%{_libdir}/clang/*/include/stdalign.h
|
||||
%{_libdir}/clang/*/include/stdarg.h
|
||||
%{_libdir}/clang/*/include/stdbool.h
|
||||
%{_libdir}/clang/*/include/stddef.h
|
||||
%{_libdir}/clang/*/include/stdint.h
|
||||
%{_libdir}/clang/*/include/tgmath.h
|
||||
%{_libdir}/clang/*/include/tmmintrin.h
|
||||
%{_libdir}/clang/*/include/varargs.h
|
||||
%{_libdir}/clang/*/include/wmmintrin.h
|
||||
%{_libdir}/clang/*/include/x86intrin.h
|
||||
%{_libdir}/clang/*/include/xmmintrin.h
|
||||
%{_libdir}/clang/*/include/mm3dnow.h
|
||||
%{_libdir}/clang/*/include/*.h
|
||||
%{_libdir}/clang/*/include/module.map
|
||||
|
||||
%files clang-devel
|
||||
%defattr(-,root,root)
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- tools/clang/lib/Basic/Version.cpp (revision 131788)
|
||||
+++ tools/clang/lib/Basic/Version.cpp (working copy)
|
||||
@@ -50,11 +50,7 @@
|
||||
Index: llvm/tools/clang/lib/Basic/Version.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/lib/Basic/Version.cpp
|
||||
+++ llvm/tools/clang/lib/Basic/Version.cpp
|
||||
@@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() {
|
||||
}
|
||||
|
||||
std::string getClangRevision() {
|
||||
@ -11,4 +13,12 @@
|
||||
-#endif
|
||||
}
|
||||
|
||||
std::string getLLVMRevision() {
|
||||
-#ifdef LLVM_REVISION
|
||||
return LLVM_REVISION;
|
||||
-#else
|
||||
- return "";
|
||||
-#endif
|
||||
}
|
||||
|
||||
std::string getClangFullRepositoryVersion() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user