Skip to content

Commit 794c0ac

Browse files
authored
Merge pull request #19810 from JuliaLang/tk/llvm-patches
Add 3 LLVM patches to fix issue #19792
2 parents 8eb55ab + 5f265f7 commit 794c0ac

File tree

17 files changed

+326
-95
lines changed

17 files changed

+326
-95
lines changed

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ cache:
3333
# Cache large downloads to avoid network unreliability
3434
- i686-4.9.2-release-win32-sjlj-rt_v4-rev3.7z
3535
- x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z
36-
- llvm-3.9.1-i686-w64-mingw32-juliadeps-r02.7z
37-
- llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r02.7z
36+
- llvm-3.9.1-i686-w64-mingw32-juliadeps-r04.7z
37+
- llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r04.7z
3838
- usr/bin/busybox.exe
3939

4040
build_script:

contrib/windows/msys_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if [ -z "$USEMSVC" ]; then
123123
fi
124124
export AR=${CROSS_COMPILE}ar
125125

126-
f=llvm-3.9.1-$ARCH-w64-mingw32-juliadeps-r02.7z
126+
f=llvm-3.9.1-$ARCH-w64-mingw32-juliadeps-r04.7z
127127
else
128128
echo "override USEMSVC = 1" >> Make.user
129129
echo "override ARCH = $ARCH" >> Make.user

deps/checksums/llvm-3.9.1-i686-w64-mingw32-juliadeps-r02.7z/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/llvm-3.9.1-i686-w64-mingw32-juliadeps-r02.7z/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
912e986977539e14fccaac70229852cc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c2632222dc2662c0fe65372d74dbf65e9dcad638a9b668952b12ab270fc633c83b1a3a48342e488757a5ded1e0b633f04fb545fd0f5867c329524ca6b2881143

deps/checksums/llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r02.7z/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r02.7z/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a32011de56ca5146a601e9866d3b4619
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3c6010b1b59979d56b611201e824405fde14a11a56c45b6fb5007c6c38c2db41c2b2590b0ca81ad0d9dbaaad9d83fd7342653a2937806f04d9693fd9611f5be3

deps/llvm.mk

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,17 +489,22 @@ $(eval $(call LLVM_PATCH,llvm-3.9.0_cygwin)) # R283427, Remove for 4.0
489489
endif
490490
$(eval $(call LLVM_PATCH,llvm-PR22923)) # Remove for 4.0
491491
$(eval $(call LLVM_PATCH,llvm-arm-fix-prel31))
492-
$(eval $(call LLVM_PATCH,llvm-D25865-cmakeshlib))
492+
$(eval $(call LLVM_PATCH,llvm-D25865-cmakeshlib)) # Remove for 4.0
493493
# Cygwin and openSUSE still use win32-threads mingw, https://llvm.org/bugs/show_bug.cgi?id=26365
494494
$(eval $(call LLVM_PATCH,llvm-3.9.0_threads))
495-
$(eval $(call LLVM_PATCH,llvm-3.9.0_win64-reloc-dwarf))
495+
$(eval $(call LLVM_PATCH,llvm-3.9.0_win64-reloc-dwarf)) # modified version applied as R290809, Remove for 4.0
496496
$(eval $(call LLVM_PATCH,llvm-3.9.0_D27296-libssp))
497-
$(eval $(call LLVM_PATCH,llvm-D27609-AArch64-UABS_G3))
497+
$(eval $(call LLVM_PATCH,llvm-D27609-AArch64-UABS_G3)) # Remove for 4.0
498498
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model))
499499
# patches for NVPTX
500500
$(eval $(call LLVM_PATCH,llvm-D9168_argument_alignment)) # Remove for 4.0
501501
$(eval $(call LLVM_PATCH,llvm-D23597_sdag_names)) # Dep for D24300, remove for 4.0
502502
$(eval $(call LLVM_PATCH,llvm-D24300_ptx_intrinsics)) # Remove for 4.0
503+
$(eval $(call LLVM_PATCH,llvm-D27389)) # Julia issue #19792, Remove for 4.0
504+
$(eval $(call LLVM_PATCH,llvm-D27397)) # Julia issue #19792, Remove for 4.0
505+
$(eval $(call LLVM_PATCH,llvm-D28009)) # Julia issue #19792, Remove for 4.0
506+
$(eval $(call LLVM_PATCH,llvm-D28215_FreeBSD_shlib))
507+
$(eval $(call LLVM_PATCH,llvm-D28221-avx512)) # mentioned in issue #19797
503508
endif # LLVM_VER
504509

505510
ifeq ($(LLVM_VER),3.7.1)

deps/patches/llvm-3.9.0_threads.patch

Lines changed: 41 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ index e5773bd..40122bd 100644
317317
llvm-as
318318
llvm-bcanalyzer
319319
diff --git a/tools/lli/CMakeLists.txt b/tools/lli/CMakeLists.txt
320-
index 2bdd066..2570d9b 100644
320+
index 2bdd066..8a4c9d0 100644
321321
--- a/tools/lli/CMakeLists.txt
322322
+++ b/tools/lli/CMakeLists.txt
323323
@@ -1,7 +1,3 @@
@@ -328,13 +328,6 @@ index 2bdd066..2570d9b 100644
328328
set(LLVM_LINK_COMPONENTS
329329
CodeGen
330330
Core
331-
@@ -39,6 +35,5 @@ endif( LLVM_USE_INTEL_JITEVENTS )
332-
333-
add_llvm_tool(lli
334-
lli.cpp
335-
- OrcLazyJIT.cpp
336-
)
337-
export_executable_symbols(lli)
338331
diff --git a/tools/lli/ChildTarget/CMakeLists.txt b/tools/lli/ChildTarget/CMakeLists.txt
339332
deleted file mode 100644
340333
index e4fe0c7..0000000
@@ -477,11 +470,10 @@ index 9d889bf..4738504 100644
477470
type = Tool
478471
name = lli
479472
diff --git a/tools/lli/OrcLazyJIT.cpp b/tools/lli/OrcLazyJIT.cpp
480-
deleted file mode 100644
481-
index b13e769..0000000
473+
index b13e769..8b13789 100644
482474
--- a/tools/lli/OrcLazyJIT.cpp
483-
+++ /dev/null
484-
@@ -1,158 +0,0 @@
475+
+++ b/tools/lli/OrcLazyJIT.cpp
476+
@@ -1,158 +1 @@
485477
-//===------ OrcLazyJIT.cpp - Basic Orc-based JIT for lazy execution -------===//
486478
-//
487479
-// The LLVM Compiler Infrastructure
@@ -639,7 +631,7 @@ index b13e769..0000000
639631
- auto Main = fromTargetAddress<MainFnPtr>(MainSym.getAddress());
640632
- return Main(ArgC, ArgV);
641633
-}
642-
-
634+
643635
diff --git a/tools/lli/OrcLazyJIT.h b/tools/lli/OrcLazyJIT.h
644636
deleted file mode 100644
645637
index 733bdd8..0000000
@@ -989,39 +981,11 @@ index 92de5da..7203af2 100644
989981
+int main(int argc, char **argv, char * const *envp) {
990982
+ return 0;
991983
+}
992-
diff --git a/tools/llvm-cov/CMakeLists.txt b/tools/llvm-cov/CMakeLists.txt
993-
index e22828e..df668c2 100644
994-
--- a/tools/llvm-cov/CMakeLists.txt
995-
+++ b/tools/llvm-cov/CMakeLists.txt
996-
@@ -2,13 +2,13 @@ set(LLVM_LINK_COMPONENTS core support object coverage profiledata)
997-
998-
add_llvm_tool(llvm-cov
999-
llvm-cov.cpp
1000-
- gcov.cpp
1001-
- CodeCoverage.cpp
1002-
- CoverageFilters.cpp
1003-
- CoverageReport.cpp
1004-
- CoverageSummaryInfo.cpp
1005-
- SourceCoverageView.cpp
1006-
- SourceCoverageViewHTML.cpp
1007-
- SourceCoverageViewText.cpp
1008-
- TestingSupport.cpp
1009-
+ # gcov.cpp
1010-
+ # CodeCoverage.cpp
1011-
+ # CoverageFilters.cpp
1012-
+ # CoverageReport.cpp
1013-
+ # CoverageSummaryInfo.cpp
1014-
+ # SourceCoverageView.cpp
1015-
+ # SourceCoverageViewHTML.cpp
1016-
+ # SourceCoverageViewText.cpp
1017-
+ # TestingSupport.cpp
1018-
)
1019984
diff --git a/tools/llvm-cov/CodeCoverage.cpp b/tools/llvm-cov/CodeCoverage.cpp
1020-
deleted file mode 100644
1021-
index 0a4d1a6..0000000
985+
index 0a4d1a6..8b13789 100644
1022986
--- a/tools/llvm-cov/CodeCoverage.cpp
1023-
+++ /dev/null
1024-
@@ -1,727 +0,0 @@
987+
+++ b/tools/llvm-cov/CodeCoverage.cpp
988+
@@ -1,727 +1 @@
1025989
-//===- CodeCoverage.cpp - Coverage tool based on profiling instrumentation-===//
1026990
-//
1027991
-// The LLVM Compiler Infrastructure
@@ -1036,7 +1000,7 @@ index 0a4d1a6..0000000
10361000
-// coverage mapping.
10371001
-//
10381002
-//===----------------------------------------------------------------------===//
1039-
-
1003+
10401004
-#include "CoverageFilters.h"
10411005
-#include "CoverageReport.h"
10421006
-#include "CoverageViewOptions.h"
@@ -1750,11 +1714,10 @@ index 0a4d1a6..0000000
17501714
- return Tool.run(CodeCoverageTool::Report, argc, argv);
17511715
-}
17521716
diff --git a/tools/llvm-cov/CoverageFilters.cpp b/tools/llvm-cov/CoverageFilters.cpp
1753-
deleted file mode 100644
1754-
index 325dd72..0000000
1717+
index 325dd72..8b13789 100644
17551718
--- a/tools/llvm-cov/CoverageFilters.cpp
1756-
+++ /dev/null
1757-
@@ -1,59 +0,0 @@
1719+
+++ b/tools/llvm-cov/CoverageFilters.cpp
1720+
@@ -1,59 +1 @@
17581721
-//===- CoverageFilters.cpp - Function coverage mapping filters ------------===//
17591722
-//
17601723
-// The LLVM Compiler Infrastructure
@@ -1767,7 +1730,7 @@ index 325dd72..0000000
17671730
-// These classes provide filtering for function coverage mapping records.
17681731
-//
17691732
-//===----------------------------------------------------------------------===//
1770-
-
1733+
17711734
-#include "CoverageFilters.h"
17721735
-#include "CoverageSummaryInfo.h"
17731736
-#include "llvm/Support/Regex.h"
@@ -1948,11 +1911,10 @@ index 756c4b4..0000000
19481911
-
19491912
-#endif // LLVM_COV_COVERAGEFILTERS_H
19501913
diff --git a/tools/llvm-cov/CoverageReport.cpp b/tools/llvm-cov/CoverageReport.cpp
1951-
deleted file mode 100644
1952-
index 10e53b3..0000000
1914+
index 10e53b3..8b13789 100644
19531915
--- a/tools/llvm-cov/CoverageReport.cpp
1954-
+++ /dev/null
1955-
@@ -1,235 +0,0 @@
1916+
+++ b/tools/llvm-cov/CoverageReport.cpp
1917+
@@ -1,235 +1 @@
19561918
-//===- CoverageReport.cpp - Code coverage report -------------------------===//
19571919
-//
19581920
-// The LLVM Compiler Infrastructure
@@ -1965,7 +1927,7 @@ index 10e53b3..0000000
19651927
-// This class implements rendering of a code coverage report.
19661928
-//
19671929
-//===----------------------------------------------------------------------===//
1968-
-
1930+
19691931
-#include "CoverageReport.h"
19701932
-#include "RenderingSupport.h"
19711933
-#include "llvm/Support/FileSystem.h"
@@ -2236,11 +2198,10 @@ index bb3d734..0000000
22362198
-
22372199
-#endif // LLVM_COV_COVERAGEREPORT_H
22382200
diff --git a/tools/llvm-cov/CoverageSummaryInfo.cpp b/tools/llvm-cov/CoverageSummaryInfo.cpp
2239-
deleted file mode 100644
2240-
index de89750..0000000
2201+
index de89750..8b13789 100644
22412202
--- a/tools/llvm-cov/CoverageSummaryInfo.cpp
2242-
+++ /dev/null
2243-
@@ -1,71 +0,0 @@
2203+
+++ b/tools/llvm-cov/CoverageSummaryInfo.cpp
2204+
@@ -1,71 +1 @@
22442205
-//===- CoverageSummaryInfo.cpp - Coverage summary for function/file -------===//
22452206
-//
22462207
-// The LLVM Compiler Infrastructure
@@ -2254,7 +2215,7 @@ index de89750..0000000
22542215
-// for functions/files.
22552216
-//
22562217
-//===----------------------------------------------------------------------===//
2257-
-
2218+
22582219
-#include "CoverageSummaryInfo.h"
22592220
-
22602221
-using namespace llvm;
@@ -2606,11 +2567,10 @@ index aa70fbc..0000000
26062567
-
26072568
-#endif // LLVM_COV_RENDERINGSUPPORT_H
26082569
diff --git a/tools/llvm-cov/SourceCoverageView.cpp b/tools/llvm-cov/SourceCoverageView.cpp
2609-
deleted file mode 100644
2610-
index baf7c14..0000000
2570+
index baf7c14..8b13789 100644
26112571
--- a/tools/llvm-cov/SourceCoverageView.cpp
2612-
+++ /dev/null
2613-
@@ -1,233 +0,0 @@
2572+
+++ b/tools/llvm-cov/SourceCoverageView.cpp
2573+
@@ -1,233 +1 @@
26142574
-//===- SourceCoverageView.cpp - Code coverage view for source code --------===//
26152575
-//
26162576
-// The LLVM Compiler Infrastructure
@@ -2623,7 +2583,7 @@ index baf7c14..0000000
26232583
-/// \file This class implements rendering for code coverage of source code.
26242584
-///
26252585
-//===----------------------------------------------------------------------===//
2626-
-
2586+
26272587
-#include "SourceCoverageView.h"
26282588
-#include "SourceCoverageViewHTML.h"
26292589
-#include "SourceCoverageViewText.h"
@@ -3136,11 +3096,10 @@ index feef959..0000000
31363096
-
31373097
-#endif // LLVM_COV_SOURCECOVERAGEVIEW_H
31383098
diff --git a/tools/llvm-cov/SourceCoverageViewHTML.cpp b/tools/llvm-cov/SourceCoverageViewHTML.cpp
3139-
deleted file mode 100644
3140-
index 81963e5..0000000
3099+
index 81963e5..8b13789 100644
31413100
--- a/tools/llvm-cov/SourceCoverageViewHTML.cpp
3142-
+++ /dev/null
3143-
@@ -1,436 +0,0 @@
3101+
+++ b/tools/llvm-cov/SourceCoverageViewHTML.cpp
3102+
@@ -1,436 +1 @@
31443103
-//===- SourceCoverageViewHTML.cpp - A html code coverage view -------------===//
31453104
-//
31463105
-// The LLVM Compiler Infrastructure
@@ -3153,7 +3112,7 @@ index 81963e5..0000000
31533112
-/// \file This file implements the html coverage renderer.
31543113
-///
31553114
-//===----------------------------------------------------------------------===//
3156-
-
3115+
31573116
-#include "SourceCoverageViewHTML.h"
31583117
-#include "llvm/ADT/Optional.h"
31593118
-#include "llvm/ADT/SmallString.h"
@@ -3667,11 +3626,10 @@ index 50ecf2b..0000000
36673626
-
36683627
-#endif // LLVM_COV_SOURCECOVERAGEVIEWHTML_H
36693628
diff --git a/tools/llvm-cov/SourceCoverageViewText.cpp b/tools/llvm-cov/SourceCoverageViewText.cpp
3670-
deleted file mode 100644
3671-
index ae9d6da..0000000
3629+
index ae9d6da..8b13789 100644
36723630
--- a/tools/llvm-cov/SourceCoverageViewText.cpp
3673-
+++ /dev/null
3674-
@@ -1,213 +0,0 @@
3631+
+++ b/tools/llvm-cov/SourceCoverageViewText.cpp
3632+
@@ -1,213 +1 @@
36753633
-//===- SourceCoverageViewText.cpp - A text-based code coverage view -------===//
36763634
-//
36773635
-// The LLVM Compiler Infrastructure
@@ -3684,7 +3642,7 @@ index ae9d6da..0000000
36843642
-/// \file This file implements the text-based coverage renderer.
36853643
-///
36863644
-//===----------------------------------------------------------------------===//
3687-
-
3645+
36883646
-#include "SourceCoverageViewText.h"
36893647
-#include "llvm/ADT/Optional.h"
36903648
-#include "llvm/ADT/SmallString.h"
@@ -3975,11 +3933,10 @@ index b233124..0000000
39753933
-
39763934
-#endif // LLVM_COV_SOURCECOVERAGEVIEWTEXT_H
39773935
diff --git a/tools/llvm-cov/TestingSupport.cpp b/tools/llvm-cov/TestingSupport.cpp
3978-
deleted file mode 100644
3979-
index 72768f4..0000000
3936+
index 72768f4..8b13789 100644
39803937
--- a/tools/llvm-cov/TestingSupport.cpp
3981-
+++ /dev/null
3982-
@@ -1,92 +0,0 @@
3938+
+++ b/tools/llvm-cov/TestingSupport.cpp
3939+
@@ -1,92 +1 @@
39833940
-//===- TestingSupport.cpp - Convert objects files into test files --------===//
39843941
-//
39853942
-// The LLVM Compiler Infrastructure
@@ -3988,7 +3945,7 @@ index 72768f4..0000000
39883945
-// License. See LICENSE.TXT for details.
39893946
-//
39903947
-//===----------------------------------------------------------------------===//
3991-
-
3948+
39923949
-#include "llvm/Object/ObjectFile.h"
39933950
-#include "llvm/ProfileData/InstrProf.h"
39943951
-#include "llvm/Support/CommandLine.h"
@@ -4073,11 +4030,10 @@ index 72768f4..0000000
40734030
- return 0;
40744031
-}
40754032
diff --git a/tools/llvm-cov/gcov.cpp b/tools/llvm-cov/gcov.cpp
4076-
deleted file mode 100644
4077-
index 4652fed..0000000
4033+
index 4652fed..8b13789 100644
40784034
--- a/tools/llvm-cov/gcov.cpp
4079-
+++ /dev/null
4080-
@@ -1,145 +0,0 @@
4035+
+++ b/tools/llvm-cov/gcov.cpp
4036+
@@ -1,145 +1 @@
40814037
-//===- gcov.cpp - GCOV compatible LLVM coverage tool ----------------------===//
40824038
-//
40834039
-// The LLVM Compiler Infrastructure
@@ -4090,7 +4046,7 @@ index 4652fed..0000000
40904046
-// llvm-cov is a command line tools to analyze and report coverage information.
40914047
-//
40924048
-//===----------------------------------------------------------------------===//
4093-
-
4049+
40944050
-#include "llvm/ADT/SmallString.h"
40954051
-#include "llvm/Support/CommandLine.h"
40964052
-#include "llvm/Support/Errc.h"

0 commit comments

Comments
 (0)