Skip to content

Commit e337bee

Browse files
authored
Merge branch 'master' into DateTime_subtraction
2 parents 2aed549 + c59468a commit e337bee

35 files changed

+939
-511
lines changed

Make.inc

+6
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,12 @@ endef
15001500
# Overridable in Make.user
15011501
WINE ?= wine
15021502

1503+
ifeq ($(BINARY),32)
1504+
HEAPLIM := --heap-size-hint=500M
1505+
else
1506+
HEAPLIM :=
1507+
endif
1508+
15031509
# many of the following targets must be = not := because the expansion of the makefile functions (and $1) shouldn't happen until later
15041510
ifeq ($(BUILD_OS), WINNT) # MSYS
15051511
spawn = $(1)

contrib/generate_precompile.jl

+1
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ generate_precompile_statements() = try # Make sure `ansi_enablecursor` is printe
465465
print("Total ─────── "); Base.time_print(stdout, tot_time); println()
466466
finally
467467
fancyprint && print(ansi_enablecursor)
468+
GC.gc(true); GC.gc(false); # reduce memory footprint
468469
return
469470
end
470471

sysimage.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ RELBUILDROOT := $(call rel_path,$(JULIAHOME)/base,$(BUILDROOT)/base)/ # <-- make
5959

6060
$(build_private_libdir)/corecompiler.ji: $(COMPILER_SRCS)
6161
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
62-
$(call spawn,$(JULIA_EXECUTABLE)) -C "$(JULIA_CPU_TARGET)" --output-ji $(call cygpath_w,$@).tmp \
62+
$(call spawn,$(JULIA_EXECUTABLE)) -C "$(JULIA_CPU_TARGET)" $(HEAPLIM) --output-ji $(call cygpath_w,$@).tmp \
6363
--startup-file=no --warn-overwrite=yes -g$(BOOTSTRAP_DEBUG_LEVEL) -O0 compiler/compiler.jl)
6464
@mv $@.tmp $@
6565

6666
$(build_private_libdir)/sys.ji: $(build_private_libdir)/corecompiler.ji $(JULIAHOME)/VERSION $(BASE_SRCS) $(STDLIB_SRCS)
6767
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
6868
if ! JULIA_BINDIR=$(call cygpath_w,$(build_bindir)) WINEPATH="$(call cygpath_w,$(build_bindir));$$WINEPATH" \
69-
$(call spawn, $(JULIA_EXECUTABLE)) -g1 -O0 -C "$(JULIA_CPU_TARGET)" --output-ji $(call cygpath_w,$@).tmp $(JULIA_SYSIMG_BUILD_FLAGS) \
69+
$(call spawn, $(JULIA_EXECUTABLE)) -g1 -O0 -C "$(JULIA_CPU_TARGET)" $(HEAPLIM) --output-ji $(call cygpath_w,$@).tmp $(JULIA_SYSIMG_BUILD_FLAGS) \
7070
--startup-file=no --warn-overwrite=yes --sysimage $(call cygpath_w,$<) sysimg.jl $(RELBUILDROOT); then \
7171
echo '*** This error might be fixed by running `make clean`. If the error persists$(COMMA) try `make cleanall`. ***'; \
7272
false; \
@@ -82,7 +82,7 @@ $$(build_private_libdir)/sys$1-o.a $$(build_private_libdir)/sys$1-bc.a : $$(buil
8282
JULIA_PROJECT= \
8383
JULIA_DEPOT_PATH=':' \
8484
JULIA_NUM_THREADS=1 \
85-
$$(call spawn, $3) $2 -C "$$(JULIA_CPU_TARGET)" --output-$$* $$(call cygpath_w,$$@).tmp $$(JULIA_SYSIMG_BUILD_FLAGS) \
85+
$$(call spawn, $3) $2 -C "$$(JULIA_CPU_TARGET)" $$(HEAPLIM) --output-$$* $$(call cygpath_w,$$@).tmp $$(JULIA_SYSIMG_BUILD_FLAGS) \
8686
--startup-file=no --warn-overwrite=yes --sysimage $$(call cygpath_w,$$<) $$(call cygpath_w,$$(JULIAHOME)/contrib/generate_precompile.jl) $(JULIA_PRECOMPILE); then \
8787
echo '*** This error is usually fixed by running `make clean`. If the error persists$$(COMMA) try `make cleanall`. ***'; \
8888
false; \

test/llvmpasses/alloc-opt-gcframe-addrspaces.jl

-40
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
; This file is a part of Julia. License is MIT: https://julialang.org/license
2+
3+
; RUN: opt -enable-new-pm=0 --opaque-pointers=0 -load libjulia-codegen%shlibext -AllocOpt -S %s | FileCheck %s --check-prefixes=CHECK,TYPED
4+
; RUN: opt -enable-new-pm=1 --opaque-pointers=0 --load-pass-plugin=libjulia-codegen%shlibext -passes='function(AllocOpt)' -S %s | FileCheck %s --check-prefixes=CHECK,TYPED
5+
6+
; RUN: opt -enable-new-pm=0 --opaque-pointers=1 -load libjulia-codegen%shlibext -AllocOpt -S %s | FileCheck %s --check-prefixes=CHECK,OPAQUE
7+
; RUN: opt -enable-new-pm=1 --opaque-pointers=1 --load-pass-plugin=libjulia-codegen%shlibext -passes='function(AllocOpt)' -S %s | FileCheck %s --check-prefixes=CHECK,OPAQUE
8+
9+
target triple = "amdgcn-amd-amdhsa"
10+
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7-ni:10:11:12:13"
11+
12+
@tag = external addrspace(10) global {}
13+
14+
declare {}*** @julia.ptls_states()
15+
declare {}*** @julia.get_pgcstack()
16+
declare noalias {} addrspace(10)* @julia.gc_alloc_obj(i8*, i64, {} addrspace(10)*)
17+
declare {}* @julia.pointer_from_objref({} addrspace(11)*)
18+
19+
; Test that non-0 addrspace allocas are properly emitted and handled
20+
21+
; CHECK-LABEL: @non_zero_addrspace
22+
; CHECK: %1 = alloca i32, align 8, addrspace(5)
23+
24+
; TYPED: %2 = bitcast i32 addrspace(5)* %1 to i8 addrspace(5)*
25+
; TYPED: %3 = bitcast i8 addrspace(5)* %2 to {} addrspace(5)*
26+
; TYPED: %var1 = addrspacecast {} addrspace(5)* %3 to {} addrspace(10)*
27+
; TYPED: call void @llvm.lifetime.start.p5i8(i64 4, i8 addrspace(5)* %2)
28+
29+
; OPAQUE: %var1 = addrspacecast ptr addrspace(5) %1 to ptr addrspace(10)
30+
; OPAQUE: call void @llvm.lifetime.start.p5(i64 4, ptr addrspace(5) %1)
31+
32+
; CHECK: ret void
33+
define void @non_zero_addrspace() {
34+
%pgcstack = call {}*** @julia.get_pgcstack()
35+
%ptls = call {}*** @julia.ptls_states()
36+
%ptls_i8 = bitcast {}*** %ptls to i8*
37+
%var1 = call {} addrspace(10)* @julia.gc_alloc_obj(i8* %ptls_i8, i64 4, {} addrspace(10)* @tag)
38+
%var2 = addrspacecast {} addrspace(10)* %var1 to {} addrspace(11)*
39+
%var3 = call {}* @julia.pointer_from_objref({} addrspace(11)* %var2)
40+
ret void
41+
}
42+
; CHECK-LABEL: }{{$}}

0 commit comments

Comments
 (0)