Skip to content

Commit 2c57b1f

Browse files
committed
Merge branch 'master' into extrama
2 parents 98d2743 + 45acb76 commit 2c57b1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+106
-5340
lines changed

base/expr.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,16 @@ macro generated(f)
574574
if isa(f, Expr) && (f.head === :function || is_short_function_def(f))
575575
body = f.args[2]
576576
lno = body.args[1]
577+
tmp = gensym("tmp")
577578
return Expr(:escape,
578579
Expr(f.head, f.args[1],
579580
Expr(:block,
580581
lno,
581582
Expr(:if, Expr(:generated),
582583
# https://github.com/JuliaLang/julia/issues/25678
583584
Expr(:block,
584-
:(local tmp = $body),
585-
:(if tmp isa Core.CodeInfo; return tmp; else tmp; end)),
585+
:(local $tmp = $body),
586+
:(if $tmp isa $(GlobalRef(Core, :CodeInfo)); return $tmp; else $tmp; end)),
586587
Expr(:block,
587588
Expr(:meta, :generated_only),
588589
Expr(:return, nothing))))))

base/reinterpretarray.jl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,15 @@ axes(a::NonReshapedReinterpretArray{T,0}) where {T} = ()
328328
elsize(::Type{<:ReinterpretArray{T}}) where {T} = sizeof(T)
329329
unsafe_convert(::Type{Ptr{T}}, a::ReinterpretArray{T,N,S} where N) where {T,S} = Ptr{T}(unsafe_convert(Ptr{S},a.parent))
330330

331-
@inline @propagate_inbounds getindex(a::NonReshapedReinterpretArray{T,0}) where {T} = reinterpret(T, a.parent[])
332-
@inline @propagate_inbounds getindex(a::ReinterpretArray) = a[1]
331+
@inline @propagate_inbounds function getindex(a::NonReshapedReinterpretArray{T,0,S}) where {T,S}
332+
if isprimitivetype(T) && isprimitivetype(S)
333+
reinterpret(T, a.parent[])
334+
else
335+
a[firstindex(a)]
336+
end
337+
end
338+
339+
@inline @propagate_inbounds getindex(a::ReinterpretArray) = a[firstindex(a)]
333340

334341
@inline @propagate_inbounds function getindex(a::ReinterpretArray{T,N,S}, inds::Vararg{Int, N}) where {T,N,S}
335342
check_readable(a)
@@ -462,8 +469,15 @@ end
462469
return t[][i1]
463470
end
464471

465-
@inline @propagate_inbounds setindex!(a::NonReshapedReinterpretArray{T,0,S} where T, v) where {S} = (a.parent[] = reinterpret(S, v))
466-
@inline @propagate_inbounds setindex!(a::ReinterpretArray, v) = (a[1] = v)
472+
@inline @propagate_inbounds function setindex!(a::NonReshapedReinterpretArray{T,0,S}, v) where {T,S}
473+
if isprimitivetype(S) && isprimitivetype(T)
474+
a.parent[] = reinterpret(S, v)
475+
return a
476+
end
477+
setindex!(a, v, firstindex(a))
478+
end
479+
480+
@inline @propagate_inbounds setindex!(a::ReinterpretArray, v) = setindex!(a, v, firstindex(a))
467481

468482
@inline @propagate_inbounds function setindex!(a::ReinterpretArray{T,N,S}, v, inds::Vararg{Int, N}) where {T,N,S}
469483
check_writable(a)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2b8de7d0df945b8f1f5cb1fee37633ca
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c8db2ee51368ef2230d5c0f97165549f74f327da1cc1e4af88a526f9ec73f3a19f48be844d360043a302bd004b7057a10db8c1d12902deb0232ac09b8fa954ad

deps/checksums/SparseArrays-205b7703b91477e6c43d8c125a0f2f486ab30cfd.tar.gz/md5

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

deps/checksums/SparseArrays-205b7703b91477e6c43d8c125a0f2f486ab30cfd.tar.gz/sha512

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

deps/llvm.mk

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ LLVM_LIB_FILE := libLLVMCodeGen.a
6161

6262
# Figure out which targets to build
6363
LLVM_TARGETS := host;NVPTX;AMDGPU;WebAssembly;BPF
64+
LLVM_EXPERIMENTAL_TARGETS :=
6465

6566
LLVM_CFLAGS :=
6667
LLVM_CXXFLAGS :=
@@ -83,6 +84,7 @@ LLVM_CXXFLAGS += $(CXXFLAGS)
8384
LLVM_CPPFLAGS += $(CPPFLAGS)
8485
LLVM_LDFLAGS += $(LDFLAGS)
8586
LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)"
87+
LLVM_CMAKE += -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD:STRING="$(LLVM_EXPERIMENTAL_TARGETS)"
8688
LLVM_CMAKE += -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))"
8789
LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=ON -DZLIB_LIBRARY="$(build_prefix)/lib"
8890
LLVM_CMAKE += -DCOMPILER_RT_ENABLE_IOS=OFF -DCOMPILER_RT_ENABLE_WATCHOS=OFF -DCOMPILER_RT_ENABLE_TVOS=OFF
@@ -230,48 +232,6 @@ $$(LLVM_BUILDDIR_withtype)/build-compiled: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patc
230232
LLVM_PATCH_PREV := $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied
231233
endef
232234

233-
ifeq ($(LLVM_VER_SHORT),11.0)
234-
ifeq ($(LLVM_VER_PATCH), 0)
235-
$(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model_6.0.1)) # remove for LLVM 12
236-
endif # LLVM_VER 11.0.0
237-
$(eval $(call LLVM_PATCH,llvm8-D34078-vectorize-fdiv)) # remove for LLVM 12
238-
$(eval $(call LLVM_PATCH,llvm-7.0-D44650)) # replaced by D90969 for LLVM 12
239-
$(eval $(call LLVM_PATCH,llvm-6.0-DISABLE_ABI_CHECKS)) # Needs upstreaming
240-
$(eval $(call LLVM_PATCH,llvm9-D50010-VNCoercion-ni)) # remove for LLVM 12
241-
$(eval $(call LLVM_PATCH,llvm7-revert-D44485)) # Needs upstreaming
242-
$(eval $(call LLVM_PATCH,llvm-11-D75072-SCEV-add-type))
243-
$(eval $(call LLVM_PATCH,llvm-julia-tsan-custom-as))
244-
$(eval $(call LLVM_PATCH,llvm-D80101)) # remove for LLVM 12
245-
$(eval $(call LLVM_PATCH,llvm-D84031)) # remove for LLVM 12
246-
ifeq ($(LLVM_VER_PATCH), 0)
247-
$(eval $(call LLVM_PATCH,llvm-10-D85553)) # remove for LLVM 12
248-
endif # LLVM_VER 11.0.0
249-
$(eval $(call LLVM_PATCH,llvm-10-unique_function_clang-sa)) # Needs upstreaming
250-
ifeq ($(BUILD_LLVM_CLANG),1)
251-
$(eval $(call LLVM_PATCH,llvm-D88630-clang-cmake))
252-
endif
253-
ifeq ($(LLVM_VER_PATCH), 0)
254-
$(eval $(call LLVM_PATCH,llvm-11-D85313-debuginfo-empty-arange)) # remove for LLVM 12
255-
$(eval $(call LLVM_PATCH,llvm-11-D90722-rtdyld-absolute-relocs)) # remove for LLVM 12
256-
endif # LLVM_VER 11.0.0
257-
$(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # Still being upstreamed as D92210
258-
$(eval $(call LLVM_PATCH,llvm-11-D92906-ppc-setjmp)) # remove for LLVM 12
259-
$(eval $(call LLVM_PATCH,llvm-11-PR48458-X86ISelDAGToDAG)) # remove for LLVM 12
260-
$(eval $(call LLVM_PATCH,llvm-11-D93092-ppc-knownbits)) # remove for LLVM 12
261-
$(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as))
262-
$(eval $(call LLVM_PATCH,llvm-11-ppc-half-ctr)) # remove for LLVM 12
263-
$(eval $(call LLVM_PATCH,llvm-11-ppc-sp-from-bp)) # remove for LLVM 12
264-
$(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12
265-
$(eval $(call LLVM_PATCH,llvm-11-D94813-mergeicmps))
266-
$(eval $(call LLVM_PATCH,llvm-11-D94980-CTR-half)) # remove for LLVM 12
267-
$(eval $(call LLVM_PATCH,llvm-11-D94058-sext-atomic-ops)) # remove for LLVM 12
268-
$(eval $(call LLVM_PATCH,llvm-11-D96283-dagcombine-half)) # remove for LLVM 12
269-
$(eval $(call LLVM_PROJ_PATCH,llvm-11-AArch64-FastIsel-bug))
270-
$(eval $(call LLVM_PROJ_PATCH,llvm-11-D97435-AArch64-movaddrreg))
271-
$(eval $(call LLVM_PROJ_PATCH,llvm-11-D97571-AArch64-loh)) # remove for LLVM 13
272-
$(eval $(call LLVM_PROJ_PATCH,llvm-11-aarch64-addrspace)) # remove for LLVM 13
273-
endif # LLVM_VER 11.0
274-
275235
# NOTE: LLVM 12 and 13 have their patches applied to JuliaLang/llvm-project
276236

277237
# Add a JL prefix to the version map. DO NOT REMOVE

deps/patches/llvm-10-D85553.patch

Lines changed: 0 additions & 53 deletions
This file was deleted.

deps/patches/llvm-10-unique_function_clang-sa.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.

deps/patches/llvm-11-AArch64-FastIsel-bug.patch

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)