diff options
Diffstat (limited to 'devel/llvm34/files')
-rw-r--r-- | devel/llvm34/files/llvm-wrapper.sh.in | 10 | ||||
-rw-r--r-- | devel/llvm34/files/patch-svn-219512 | 61 | ||||
-rw-r--r-- | devel/llvm34/files/patch-utils_llvm-build_llvmbuild_main.py | 21 |
3 files changed, 92 insertions, 0 deletions
diff --git a/devel/llvm34/files/llvm-wrapper.sh.in b/devel/llvm34/files/llvm-wrapper.sh.in new file mode 100644 index 000000000000..0a460f3156e5 --- /dev/null +++ b/devel/llvm34/files/llvm-wrapper.sh.in @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +LLVM_PREFIX="%%LLVM_PREFIX%%" +LLVM_SUFFIX="%%LLVM_SUFFIX%%" + +tool=$(basename $0) +tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}" +LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \ + "${tool}" "${@}" diff --git a/devel/llvm34/files/patch-svn-219512 b/devel/llvm34/files/patch-svn-219512 new file mode 100644 index 000000000000..4b8dd6670eb1 --- /dev/null +++ b/devel/llvm34/files/patch-svn-219512 @@ -0,0 +1,61 @@ +------------------------------------------------------------------------ +r219512 | hfinkel | 2014-10-10 17:06:20 +0000 (Fri, 10 Oct 2014) | 10 lines + +[MiSched] Fix a logic error in tryPressure() + +Fixes a logic error in the MachineScheduler found by Steve Montgomery (and +confirmed by Andy). This has gone unfixed for months because the fix has been +found to introduce some small performance regressions. However, Andy has +recommended that, at this point, we fix this to avoid further dependence on the +incorrect behavior (and then follow-up separately on any regressions), and I +agree. + +Fixes PR18883. +------------------------------------------------------------------------ +Index: lib/CodeGen/MachineScheduler.cpp +=================================================================== +--- lib/CodeGen/MachineScheduler.cpp (revision 219511) ++++ lib/CodeGen/MachineScheduler.cpp (revision 219512) +@@ -2495,8 +2495,8 @@ + } + // If one candidate decreases and the other increases, go with it. + // Invalid candidates have UnitInc==0. +- if (tryLess(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand, +- Reason)) { ++ if (tryGreater(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand, ++ Reason)) { + return true; + } + // If the candidates are decreasing pressure, reverse priority. +#Index: test/CodeGen/X86/ragreedy-last-chance-recoloring.ll +#=================================================================== +#--- test/CodeGen/X86/ragreedy-last-chance-recoloring.ll (revision 219511) +#+++ test/CodeGen/X86/ragreedy-last-chance-recoloring.ll (revision 219512) +#@@ -2,10 +2,12 @@ +# ; Without the last chance recoloring, this test fails with: +# ; "ran out of registers". +# +#-; RUN: not llc -regalloc=greedy -relocation-model=pic -lcr-max-depth=0 < %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEPTH +#+; NOTE: With the fix to PR18883, we don't actually run out of registers here +#+; any more, and so those checks are disabled. This test remains only for general coverage. +#+; XXX: not llc -regalloc=greedy -relocation-model=pic -lcr-max-depth=0 < %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEPTH +# ; Test whether failure due to cutoff for depth is reported +# +#-; RUN: not llc -regalloc=greedy -relocation-model=pic -lcr-max-interf=1 < %s 2>&1 | FileCheck %s --check-prefix=CHECK-INTERF +#+; XXX: not llc -regalloc=greedy -relocation-model=pic -lcr-max-interf=1 < %s 2>&1 | FileCheck %s --check-prefix=CHECK-INTERF +# ; Test whether failure due to cutoff for interference is reported +# +# ; RUN: llc -regalloc=greedy -relocation-model=pic -lcr-max-interf=1 -lcr-max-depth=0 -exhaustive-register-search < %s > %t 2>&1 +#Index: test/CodeGen/X86/misched-matmul.ll +#=================================================================== +#--- test/CodeGen/X86/misched-matmul.ll (revision 219511) +#+++ test/CodeGen/X86/misched-matmul.ll (revision 219512) +#@@ -10,7 +10,7 @@ +# ; more complex cases. +# ; +# ; CHECK: @wrap_mul4 +#-; CHECK: 22 regalloc - Number of spills inserted +#+; CHECK: 23 regalloc - Number of spills inserted +# +# define void @wrap_mul4(double* nocapture %Out, [4 x double]* nocapture %A, [4 x double]* nocapture %B) #0 { +# entry: diff --git a/devel/llvm34/files/patch-utils_llvm-build_llvmbuild_main.py b/devel/llvm34/files/patch-utils_llvm-build_llvmbuild_main.py new file mode 100644 index 000000000000..9ba38635e136 --- /dev/null +++ b/devel/llvm34/files/patch-utils_llvm-build_llvmbuild_main.py @@ -0,0 +1,21 @@ +--- utils/llvm-build/llvmbuild/main.py.orig ++++ utils/llvm-build/llvmbuild/main.py +@@ -660,7 +660,17 @@ + + # We handle a few special cases of target names here for historical + # reasons, as these are the names configure currently comes up with. +- native_target_name = { 'x86' : 'X86', ++ native_target_name = { 'amd64' : 'X86', ++ 'arm' : 'ARM', ++ 'armeb' : 'ARM', ++ 'armv6' : 'ARM', ++ 'armv6hf' : 'ARM', ++ 'i386' : 'X86', ++ 'mips' : 'Mips', ++ 'powerpc' : 'PowerPC', ++ 'powerpc64' : 'PowerPC', ++ 'sparc64' : 'Sparc', ++ 'x86' : 'X86', + 'x86_64' : 'X86', + 'Unknown' : None }.get(opts.native_target, + opts.native_target) |