Skip to content

Commit

Permalink
Test for missing TBAA on field load
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed May 6, 2016
1 parent 8cd76e9 commit b10548b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions julia/track_tbaa/gen.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/julia -f

immutable Gen
iter::UnitRange{Int}
end
gen = Gen(1:10)
function collect_to2!{T}(dest::AbstractArray{T}, itr)
i = 1
st = start(itr.iter)
while !done(itr.iter, st)
el, st = next(itr.iter, st)
@inbounds dest[i] = el
i += 1
end
return dest
end
# code_llvm(STDOUT, collect_to2!, Tuple{Vector{Float64},Gen}, false, true)
@code_llvm collect_to2!(Vector{Float64}(10), gen)
@show collect_to2!(Vector{Float64}(10), gen)

0 comments on commit b10548b

Please sign in to comment.