[llvm] llvm 3.4.1

Adam Jackson ajax at fedoraproject.org
Thu May 29 15:46:13 UTC 2014


commit 8150742540e6e05adf59cfca0f1226e03b02273b
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue May 27 15:13:37 2014 -0400

    llvm 3.4.1
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

 0001-Merging-r207990.patch |   40 ++++++++++++++
 0002-Merging-r208721.patch |   85 +++++++++++++++++++++++++++++
 0003-Merging-r208501.patch |  126 ++++++++++++++++++++++++++++++++++++++++++++
 0004-Merging-r208908.patch |   38 +++++++++++++
 llvm.spec                  |   28 +++++++---
 sources                    |    2 +-
 6 files changed, 310 insertions(+), 9 deletions(-)
---
diff --git a/0001-Merging-r207990.patch b/0001-Merging-r207990.patch
new file mode 100644
index 0000000..2eb6d2d
--- /dev/null
+++ b/0001-Merging-r207990.patch
@@ -0,0 +1,40 @@
+From 84f40fa9c1fea93311fa1211569ba5a2bf33a620 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard at amd.com>
+Date: Thu, 15 May 2014 00:15:24 +0000
+Subject: [PATCH 1/5] Merging r207990:
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+------------------------------------------------------------------------
+r207990 | marek.olsak | 2014-05-05 15:30:54 -0400 (Mon, 05 May 2014) | 6 lines
+
+R600/SI: allow 5 more input SGPRs to a shader
+
+Our OpenGL driver needs 22 SGPRs (16 user SGPRs + 6 streamout non-user SGPRs).
+
+Signed-off-by: Marek Olšák <marek.olsak at amd.com>
+
+------------------------------------------------------------------------
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208828 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/Target/R600/AMDGPUCallingConv.td | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Target/R600/AMDGPUCallingConv.td b/lib/Target/R600/AMDGPUCallingConv.td
+index 65cdb24..5f8ad8c 100644
+--- a/lib/Target/R600/AMDGPUCallingConv.td
++++ b/lib/Target/R600/AMDGPUCallingConv.td
+@@ -20,7 +20,7 @@ def CC_SI : CallingConv<[
+   CCIfInReg<CCIfType<[f32, i32] , CCAssignToReg<[
+     SGPR0, SGPR1, SGPR2, SGPR3, SGPR4, SGPR5, SGPR6, SGPR7,
+     SGPR8, SGPR9, SGPR10, SGPR11, SGPR12, SGPR13, SGPR14, SGPR15,
+-    SGPR16
++    SGPR16, SGPR17, SGPR18, SGPR19, SGPR20, SGPR21
+   ]>>>,
+ 
+   CCIfInReg<CCIfType<[i64] , CCAssignToRegWithShadow<
+-- 
+1.9.3
+
diff --git a/0002-Merging-r208721.patch b/0002-Merging-r208721.patch
new file mode 100644
index 0000000..cddb2d5
--- /dev/null
+++ b/0002-Merging-r208721.patch
@@ -0,0 +1,85 @@
+From e47eb279d50f38374a3f5b95a8c4bcc2112ed408 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard at amd.com>
+Date: Thu, 15 May 2014 00:15:27 +0000
+Subject: [PATCH 2/5] Merging r208721:
+
+------------------------------------------------------------------------
+r208721 | thomas.stellard | 2014-05-13 15:37:03 -0400 (Tue, 13 May 2014) | 11 lines
+
+autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)
+
+We were using libLLVM-Major.Minor.Patch.so for the soname, but we
+need the soname to stay consistent for all Major.Minor.* releases
+otherwise operating system distributors  will need to rebuild all
+packages that link with LLVM every time there is a new point release.
+
+This patch also reverses the compatibility symlink, so
+libLLVM-Major.Minor.Patch.so is now a symlink that points
+to libLLVM-Major-Minor.so.
+
+------------------------------------------------------------------------
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208829 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ Makefile.rules            | 15 ++++++++++++---
+ tools/llvm-shlib/Makefile |  4 ++--
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 210abda..18882fa 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -1027,8 +1027,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \
+                    -L $(SharedLibDir)
+ endif
+-LLVMLibsOptions += -lLLVM-$(LLVMVersion)
+-LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
++LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
++LLVMLibsOptions += -l$(LLVM_SO_NAME)
++LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT)
+ else
+ 
+ ifndef NO_LLVM_CONFIG
+@@ -1144,7 +1145,12 @@ LibName.O  := $(LibDir)/$(LIBRARYNAME).o
+ #---------------------------------------------------------
+ ifdef SHARED_LIBRARY
+ 
+-all-local:: $(LibName.SO)
++all-local:: $(AliasName.SO)
++
++$(AliasName.SO): $(LibName.SO)
++ifdef SHARED_ALIAS
++	$(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO)
++endif
+ 
+ ifdef EXPORTED_SYMBOL_FILE
+ $(LibName.SO): $(NativeExportsFile)
+@@ -1202,6 +1208,9 @@ endif
+ uninstall-local::
+ 	$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
+ 	-$(Verb) $(RM) -f $(DestSharedLib)
++ifdef SHARED_ALIAS
++	-$(Verb) $(RM) -f $(DestSharedAlias)
++endif
+ endif
+ endif
+ 
+diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile
+index 4a0c2ea..b912ea6 100644
+--- a/tools/llvm-shlib/Makefile
++++ b/tools/llvm-shlib/Makefile
+@@ -9,8 +9,8 @@
+ 
+ LEVEL := ../..
+ 
+-LIBRARYNAME = LLVM-$(LLVMVersion)
+-LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
++LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
++LIBRARYALIASNAME = LLVM-$(LLVMVersion)
+ 
+ NO_BUILD_ARCHIVE := 1
+ LINK_LIBS_IN_SHARED := 1
+-- 
+1.9.3
+
diff --git a/0003-Merging-r208501.patch b/0003-Merging-r208501.patch
new file mode 100644
index 0000000..ca7da97
--- /dev/null
+++ b/0003-Merging-r208501.patch
@@ -0,0 +1,126 @@
+From ffecacb1a1eeca8ca8567057c3c886161837d2a6 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard at amd.com>
+Date: Thu, 15 May 2014 20:55:58 +0000
+Subject: [PATCH 3/5] Merging r208501:
+
+------------------------------------------------------------------------
+r208501 | hfinkel | 2014-05-11 12:23:29 -0400 (Sun, 11 May 2014) | 9 lines
+
+[PowerPC] On PPC32, 128-bit shifts might be runtime calls
+
+The counter-loops formation pass needs to know what operations might be
+function calls (because they can't appear in counter-based loops). On PPC32,
+128-bit shifts might be runtime calls (even though you can't use __int128 on
+PPC32, it seems that SROA might form them).
+
+Fixes PR19709.
+
+------------------------------------------------------------------------
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208916 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/Target/PowerPC/PPCCTRLoops.cpp |  8 +++++
+ test/CodeGen/PowerPC/ctrloop-sh.ll | 72 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 80 insertions(+)
+ create mode 100644 test/CodeGen/PowerPC/ctrloop-sh.ll
+
+diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp
+index e419b9b..819635c 100644
+--- a/lib/Target/PowerPC/PPCCTRLoops.cpp
++++ b/lib/Target/PowerPC/PPCCTRLoops.cpp
+@@ -369,6 +369,14 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) {
+                 J->getOpcode() == Instruction::URem ||
+                 J->getOpcode() == Instruction::SRem)) {
+       return true;
++    } else if (TT.isArch32Bit() &&
++               isLargeIntegerTy(false, J->getType()->getScalarType()) &&
++               (J->getOpcode() == Instruction::Shl ||
++                J->getOpcode() == Instruction::AShr ||
++                J->getOpcode() == Instruction::LShr)) {
++      // Only on PPC32, for 128-bit integers (specifically not 64-bit
++      // integers), these might be runtime calls.
++      return true;
+     } else if (isa<IndirectBrInst>(J) || isa<InvokeInst>(J)) {
+       // On PowerPC, indirect jumps use the counter register.
+       return true;
+diff --git a/test/CodeGen/PowerPC/ctrloop-sh.ll b/test/CodeGen/PowerPC/ctrloop-sh.ll
+new file mode 100644
+index 0000000..d8e6fc7
+--- /dev/null
++++ b/test/CodeGen/PowerPC/ctrloop-sh.ll
+@@ -0,0 +1,72 @@
++; RUN: llc < %s | FileCheck %s
++target datalayout = "E-m:e-p:32:32-i128:64-n32"
++target triple = "powerpc-ellcc-linux"
++
++; Function Attrs: nounwind
++define void @foo1(i128* %a, i128* readonly %b, i128* readonly %c) #0 {
++entry:
++  br label %for.body
++
++for.body:                                         ; preds = %for.body, %entry
++  %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
++  %0 = load i128* %b, align 16
++  %1 = load i128* %c, align 16
++  %shl = shl i128 %0, %1
++  store i128 %shl, i128* %a, align 16
++  %inc = add nsw i32 %i.02, 1
++  %exitcond = icmp eq i32 %inc, 2048
++  br i1 %exitcond, label %for.end, label %for.body
++
++for.end:                                          ; preds = %for.body
++  ret void
++
++; CHECK-LABEL: @foo1
++; CHECK-NOT: mtctr
++}
++
++; Function Attrs: nounwind
++define void @foo2(i128* %a, i128* readonly %b, i128* readonly %c) #0 {
++entry:
++  br label %for.body
++
++for.body:                                         ; preds = %for.body, %entry
++  %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
++  %0 = load i128* %b, align 16
++  %1 = load i128* %c, align 16
++  %shl = ashr i128 %0, %1
++  store i128 %shl, i128* %a, align 16
++  %inc = add nsw i32 %i.02, 1
++  %exitcond = icmp eq i32 %inc, 2048
++  br i1 %exitcond, label %for.end, label %for.body
++
++for.end:                                          ; preds = %for.body
++  ret void
++
++; CHECK-LABEL: @foo2
++; CHECK-NOT: mtctr
++}
++
++; Function Attrs: nounwind
++define void @foo3(i128* %a, i128* readonly %b, i128* readonly %c) #0 {
++entry:
++  br label %for.body
++
++for.body:                                         ; preds = %for.body, %entry
++  %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
++  %0 = load i128* %b, align 16
++  %1 = load i128* %c, align 16
++  %shl = lshr i128 %0, %1
++  store i128 %shl, i128* %a, align 16
++  %inc = add nsw i32 %i.02, 1
++  %exitcond = icmp eq i32 %inc, 2048
++  br i1 %exitcond, label %for.end, label %for.body
++
++for.end:                                          ; preds = %for.body
++  ret void
++
++; CHECK-LABEL: @foo3
++; CHECK-NOT: mtctr
++}
++
++attributes #0 = { nounwind }
++
+-- 
+1.9.3
+
diff --git a/0004-Merging-r208908.patch b/0004-Merging-r208908.patch
new file mode 100644
index 0000000..6ed9c21
--- /dev/null
+++ b/0004-Merging-r208908.patch
@@ -0,0 +1,38 @@
+From b04b00516fea37dddfa4d499e5672c203ff66cb1 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard at amd.com>
+Date: Thu, 15 May 2014 20:56:00 +0000
+Subject: [PATCH 4/5] Merging r208908:
+
+------------------------------------------------------------------------
+r208908 | thomas.stellard | 2014-05-15 15:50:25 -0400 (Thu, 15 May 2014) | 7 lines
+
+autoconf: Fix libLLVM-Major-Minor-Patch.so symlink
+
+The symlink needs to point to a relative path, so we don't break
+building in a chroot.
+
+Tested-by: Laurent Carlier <lordheavym at gmail.org>
+
+------------------------------------------------------------------------
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208917 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 18882fa..fde77f9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -1202,7 +1202,7 @@ $(DestSharedLib): $(LibName.SO) $(DestSharedLibDir)
+ 	$(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib)
+ ifdef SHARED_ALIAS
+ 	$(Echo) Creating alias from $(DestSharedLib) to $(DestSharedAlias)
+-	$(Verb) $(AliasTool) $(DestSharedLib) $(DestSharedAlias)
++	$(Verb) $(AliasTool) $(BaseLibName.SO) $(DestSharedAlias)
+ endif
+ 
+ uninstall-local::
+-- 
+1.9.3
+
diff --git a/llvm.spec b/llvm.spec
index 263f346..a657842 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -36,7 +36,7 @@
 
 Name:           llvm
 Version:        3.4
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        The Low Level Virtual Machine
 
 Group:          Development/Languages
@@ -44,7 +44,7 @@ License:        NCSA
 URL:            http://llvm.org/
 
 # source archives
-Source0:        %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz
+Source0:        %{downloadurl}/llvm-%{version}.1%{?prerel}.src.tar.gz
 Source1:        %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz
 Source2:        %{downloadurl}/compiler-rt-%{version}%{?prerel}.src.tar.gz
 Source3:        %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz
@@ -53,12 +53,15 @@ Source3:        %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz
 Source10:       llvm-Config-config.h
 Source11:       llvm-Config-llvm-config.h
 
-# patches
-Patch1:         0001-data-install-preserve-timestamps.patch
-Patch2:         0002-linker-flags-speedup-memory.patch
+# sync with release_34 at 209031
+Patch1:		0001-Merging-r207990.patch
+Patch2:		0002-Merging-r208721.patch
+Patch3:		0003-Merging-r208501.patch
+Patch4:		0004-Merging-r208908.patch
 
-# radeonsi GL 3.3 backport
-Patch3:         llvm-3.4-radeonsi-backport.patch
+# patches
+Patch11:         0001-data-install-preserve-timestamps.patch
+Patch12:         0002-linker-flags-speedup-memory.patch
 
 BuildRequires:  bison
 BuildRequires:  chrpath
@@ -122,12 +125,14 @@ Documentation for the LLVM compiler infrastructure.
 %package libs
 Summary:        LLVM shared libraries
 Group:          System Environment/Libraries
+%if 0%{?fedora} > 20
 ## retire OpenGTL/libQtGTL here
 Obsoletes: OpenGTL < 0.9.18-50
 Obsoletes: OpenGTL-libs < 0.9.18-50
 Obsoletes: OpenGTL-devel < 0.9.18-50
 Obsoletes: libQtGTL < 0.9.3-50
 Obsoletes: libQtGTL-devel < 0.9.3-50
+%endif
 
 %description libs
 Shared libraries for the LLVM compiler infrastructure.
@@ -277,7 +282,7 @@ HTML documentation for LLVM's OCaml binding.
 
 
 %prep
-%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3}
+%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} -n llvm-3.4.1.src
 rm -rf tools/clang tools/lldb projects/compiler-rt
 %if %{with clang}
 mv clang-%{version} tools/clang
@@ -292,6 +297,9 @@ mv lldb-%{version} tools/lldb
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch11 -p1
+%patch12 -p1
 
 # fix library paths
 sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure
@@ -657,6 +665,10 @@ exit 0
 %endif
 
 %changelog
+* Thu May 29 2014 Adam Jackson <ajax at redhat.com> 3.4-7
+- Update to llvm 3.4.1 plus a few things from svn
+- Drop radeonsi patch, merged in 3.4.1
+
 * Thu Mar 27 2014 Rex Dieter <rdieter at fedoraproject.org> 3.4-6
 - -libs: Obsoletes: OpenGTL libQtGTL
 
diff --git a/sources b/sources
index 5ac19b5..63b25c4 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
 b378f1e2c424e03289effc75268d3d2c  clang-3.4.src.tar.gz
 7ed60a0463f9fdfa20db7109d4624cee  lldb-3.4.src.tar.gz
 7938353e3a3bda85733a165e7ac4bb84  compiler-rt-3.4.src.tar.gz
-46ed668a1ce38985120dbf6344cf6116  llvm-3.4.src.tar.gz
+b90697f4de35563ad6c35924defa8dd1  llvm-3.4.1.src.tar.gz


More information about the scm-commits mailing list