Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop support for LLVM <6.0.0 throughout Julia #28696

Merged
merged 2 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions base/atomics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ export
atomic_max!, atomic_min!,
atomic_fence

# Disable 128-bit types on 32-bit Intel systems due to LLVM problems;
# see <https://github.com/JuliaLang/julia/issues/14818> (fixed on LLVM 3.9)
# 128-bit atomics do not exist on AArch32.
if (Base.libllvm_version < v"3.9-" && ARCH === :i686) ||
startswith(string(ARCH), "arm")
if startswith(string(ARCH), "arm")
const inttypes = (Int8, Int16, Int32, Int64,
UInt8, UInt16, UInt32, UInt64)
else
Expand Down Expand Up @@ -345,8 +342,8 @@ gc_alignment(::Type{T}) where {T} = ccall(:jl_alignment, Cint, (Csize_t,), sizeo
for typ in atomictypes
lt = llvmtypes[typ]
ilt = llvmtypes[inttype(typ)]
rt = Base.libllvm_version >= v"3.6" ? "$lt, $lt*" : "$lt*"
irt = Base.libllvm_version >= v"3.6" ? "$ilt, $ilt*" : "$ilt*"
rt = "$lt, $lt*"
irt = "$ilt, $ilt*"
@eval getindex(x::Atomic{$typ}) =
llvmcall($"""
%ptr = inttoptr i$WORD_SIZE %0 to $lt*
Expand Down
4 changes: 0 additions & 4 deletions base/checked.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ if Core.sizeof(Ptr{Cvoid}) == 4
brokenSignedIntMul = Union{brokenSignedIntMul, Int64}
brokenUnsignedIntMul = Union{brokenUnsignedIntMul, UInt64}
end
if llvm_version < 30500
brokenSignedIntMul = Union{brokenSignedIntMul, Int8}
brokenUnsignedIntMul = Union{brokenUnsignedIntMul, UInt8}
end
const BrokenSignedInt = brokenSignedInt
const BrokenUnsignedInt = brokenUnsignedInt
const BrokenSignedIntMul = brokenSignedIntMul
Expand Down
113 changes: 9 additions & 104 deletions deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -384,120 +384,31 @@ $$(LLVM_BUILDDIR_withtype)/build-compiled: $$(LLVM_SRC_DIR)/$1.patch-applied
LLVM_PATCH_PREV := $$(LLVM_SRC_DIR)/$1.patch-applied
endef

ifeq ($(LLVM_VER_SHORT),3.9)
$(eval $(call LLVM_PATCH,llvm-PR22923)) # Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-arm-fix-prel31)) # Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D25865-cmakeshlib)) # Remove for 4.0
# Cygwin and openSUSE still use win32-threads mingw, https://llvm.org/bugs/show_bug.cgi?id=26365
$(eval $(call LLVM_PATCH,llvm-3.9.0_threads))
$(eval $(call LLVM_PATCH,llvm-3.9.0_win64-reloc-dwarf)) # modified version applied as R290809, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-3.9.0_D27296-libssp))
$(eval $(call LLVM_PATCH,llvm-D27609-AArch64-UABS_G3)) # Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model))
$(eval $(call LLVM_PATCH,llvm-NVPTX-addrspaces)) # NVPTX
$(eval $(call LLVM_PATCH,llvm-D9168_argument_alignment)) # NVPTX, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D23597_sdag_names)) # NVPTX, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D24300_ptx_intrinsics)) # NVPTX, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D27389)) # Julia issue #19792, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D27397)) # Julia issue #19792, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D28009)) # Julia issue #19792, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D28215_FreeBSD_shlib))
$(eval $(call LLVM_PATCH,llvm-D28221-avx512)) # mentioned in issue #19797
$(eval $(call LLVM_PATCH,llvm-PR276266)) # Issue #19976, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-PR278088)) # Issue #19976, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-PR277939)) # Issue #19976, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-PR278321)) # Issue #19976, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-PR278923)) # Issue #19976, Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D28759-loopclearance))
$(eval $(call LLVM_PATCH,llvm-D28786-callclearance))
$(eval $(call LLVM_PATCH,llvm-rL293230-icc17-cmake)) # Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-D32593))
$(eval $(call LLVM_PATCH,llvm-D33179))
$(eval $(call LLVM_PATCH,llvm-PR29010-i386-xmm)) # Remove for 4.0
$(eval $(call LLVM_PATCH,llvm-3.9.0-D37576-NVPTX-sm_70)) # NVPTX, Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D37939-Mem2Reg-Also-handle-memcpy))
$(eval $(call LLVM_PATCH,llvm-D31524-sovers_4.0)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D42262-jumpthreading-not-i1))
$(eval $(call LLVM_PATCH,llvm-3.9-c_api_nullptr))
$(eval $(call LLVM_PATCH,llvm-PPC-addrspaces)) # PPC
$(eval $(call LLVM_PATCH,llvm-D30114)) # PPC remove for 5.0
$(eval $(call LLVM_PATCH,llvm-PR36292)) # PPC fixes #26249, remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D39297-musl-dynamiclibrary-pre5)) # Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D28476-musl-targetlibraryinfo_3.9)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D46460))
ifeq ($(BUILD_LLVM_CLANG),1)
$(eval $(call LLVM_PATCH,compiler_rt-3.9-glibc_2.25.90)) # Remove for 5.0
$(eval $(call LLVM_PATCH,clang-D28477)) # Remove for 5.0
endif
else ifeq ($(LLVM_VER_SHORT),4.0)
# Cygwin and openSUSE still use win32-threads mingw, https://llvm.org/bugs/show_bug.cgi?id=26365
$(eval $(call LLVM_PATCH,llvm-4.0.0_threads))
$(eval $(call LLVM_PATCH,llvm-3.9.0_D27296-libssp))
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model_4.0))
$(eval $(call LLVM_PATCH,llvm-D28215_FreeBSD_shlib)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D28759-loopclearance)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D28786-callclearance_4.0)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D32593)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D33179)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D32203-SORA-non-integral)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D33110-codegen-prepare-inttoptr))
$(eval $(call LLVM_PATCH,llvm-D30478-VNCoercion)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-VNCoercion-signatures)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-VNCoercion-template)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D32196-LIR-non-integral)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D32208-coerce-non-integral)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D32623-GVN-non-integral)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D33129-scevexpander-non-integral)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-Yet-another-fix))
$(eval $(call LLVM_PATCH,llvm-NVPTX-addrspaces)) # NVPTX
$(eval $(call LLVM_PATCH,llvm-4.0.0-D37576-NVPTX-sm_70)) # NVPTX, Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-loadcse-addrspace_4.0))
$(eval $(call LLVM_PATCH,llvm-D31524-sovers_4.0)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D42262-jumpthreading-not-i1))
$(eval $(call LLVM_PATCH,llvm-PPC-addrspaces)) # PPC
$(eval $(call LLVM_PATCH,llvm-D30114)) # PPC remove for 5.0
$(eval $(call LLVM_PATCH,llvm-PR36292)) # PPC fixes #26249, remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D39297-musl-dynamiclibrary-pre5)) # Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D28476-musl-targetlibraryinfo_4.0)) # Remove for 5.0
$(eval $(call LLVM_PATCH,llvm-D46460))
ifeq ($(BUILD_LLVM_CLANG),1)
$(eval $(call LLVM_PATCH,compiler_rt-3.9-glibc_2.25.90)) # Remove for 5.0
$(eval $(call LLVM_PATCH,clang-D28477)) # Remove for 5.0
endif
else ifeq ($(LLVM_VER_SHORT),5.0)
# Cygwin and openSUSE still use win32-threads mingw, https://llvm.org/bugs/show_bug.cgi?id=26365
$(eval $(call LLVM_PATCH,llvm-5.0.0_threads))
$(eval $(call LLVM_PATCH,llvm-3.9.0_D27296-libssp))
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model_4.0))
$(eval $(call LLVM_PATCH,llvm-loadcse-addrspace_5.0))
$(eval $(call LLVM_PATCH,llvm-D34078-vectorize-fdiv))
$(eval $(call LLVM_PATCH,llvm-5.0-NVPTX-addrspaces)) # NVPTX
$(eval $(call LLVM_PATCH,llvm-4.0.0-D37576-NVPTX-sm_70)) # NVPTX, Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D38765-gvn_5.0)) # Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D42262-jumpthreading-not-i1)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-PPC-addrspaces)) # PPC
$(eval $(call LLVM_PATCH,llvm-PR36292-5.0)) # PPC fixes #26249, remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D39297-musl-dynamiclibrary)) # Remove for 6.0
$(eval $(call LLVM_PATCH,llvm-D46460))
else ifeq ($(LLVM_VER_SHORT),6.0)
ifeq ($(LLVM_VER_SHORT),6.0)
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model_4.0))
$(eval $(call LLVM_PATCH,llvm-D34078-vectorize-fdiv))
$(eval $(call LLVM_PATCH,llvm-6.0-NVPTX-addrspaces)) # NVPTX
$(eval $(call LLVM_PATCH,llvm-D42262-jumpthreading-not-i1)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-PPC-addrspaces)) # remove for 7.0
ifeq ($(LLVM_VER_PATCH), 0)
$(eval $(call LLVM_PATCH,llvm-D42260)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-rL326843-missing-header)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-6.0-r327540)) # remove for 7.0
endif
$(eval $(call LLVM_PATCH,llvm-6.0.0_D27296-libssp)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-6.0-D44650)) # mingw32 build fix
ifeq ($(LLVM_VER_PATCH), 0)
$(eval $(call LLVM_PATCH,llvm-D45008)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-D45070)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-6.0.0-ifconv-D45819)) # remove for 7.0
endif
$(eval $(call LLVM_PATCH,llvm-D46460))
ifeq ($(LLVM_VER_PATCH), 0)
$(eval $(call LLVM_PATCH,llvm-rL332680)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-rL332682)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-rL332302)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-rL332694)) # remove for 7.0
endif
$(eval $(call LLVM_PATCH,llvm-rL327898)) # remove for 7.0
$(eval $(call LLVM_PATCH,llvm-6.0-DISABLE_ABI_CHECKS))
$(eval $(call LLVM_PATCH,llvm-OProfile-line-num))
Expand All @@ -506,18 +417,12 @@ $(eval $(call LLVM_PATCH,llvm-D49832-SCEVPred)) # Remove for 7.0
$(eval $(call LLVM_PATCH,llvm-rL323946-LSRTy)) # Remove for 7.0
$(eval $(call LLVM_PATCH,llvm-D50010-VNCoercion-ni))
$(eval $(call LLVM_PATCH,llvm-D50167-scev-umin))
ifeq ($(LLVM_VER_PATCH), 0)
$(eval $(call LLVM_PATCH,llvm-windows-race))
endif # LLVM_VER

# Remove hardcoded OS X requirements in compilter-rt cmake build
ifeq ($(LLVM_VER_SHORT),3.9)
ifeq ($(BUILD_LLVM_CLANG),1)
$(eval $(call LLVM_PATCH,llvm-3.9-osx-10.12))
endif
endif
endif # LLVM_VER

# Independent to the llvm version add a JL prefix to the version map
# Depends on `llvm-D31524-sovers_4.0` for LLVM_VER==3.9
$(eval $(call LLVM_PATCH,llvm-symver-jlprefix)) # DO NOT REMOVE


Expand Down
118 changes: 0 additions & 118 deletions deps/patches/compiler_rt-3.9-glibc_2.25.90.patch

This file was deleted.

41 changes: 0 additions & 41 deletions deps/patches/lldb-3.7.1.patch

This file was deleted.

39 changes: 0 additions & 39 deletions deps/patches/llvm-3.9-c_api_nullptr.patch

This file was deleted.

Loading