forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline-o0.jl
31 lines (26 loc) · 1008 Bytes
/
pipeline-o0.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This file is a part of Julia. License is MIT: https://julialang.org/license
# RUN: julia --startup-file=no -O0 --check-bounds=yes %s %t -O && llvm-link -S %t/* | FileCheck %s
# RUN: julia --startup-file=no -O1 --check-bounds=yes %s %t -O && llvm-link -S %t/* | FileCheck %s
# RUN: julia --startup-file=no -O2 --check-bounds=yes %s %t -O && llvm-link -S %t/* | FileCheck %s
# RUN: julia --startup-file=no -O3 --check-bounds=yes %s %t -O && llvm-link -S %t/* | FileCheck %s
include(joinpath("..", "testhelpers", "llvmpasses.jl"))
# CHECK-LABEL: @julia_simple
# CHECK-NOT: julia.get_pgcstack
# CHECK-NOT: julia.gc_alloc_obj
# CHECK: ijl_gc_pool_alloc
# COM: we want something vaguely along the lines of asm load from the fs register -> allocate bytes
function simple()
Ref(0)
end
# CHECK-LABEL: @julia_buildarray
# CHECK-NOT: julia.write_barrier
# CHECK: gc_queue_root
function buildarray()
out = []
for i in 1:100
push!(out, Ref(0))
end
out
end
emit(simple)
emit(buildarray)