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

Unnecessary gc root slots in generated code #20981

Closed
Keno opened this issue Mar 11, 2017 · 1 comment · Fixed by #21888
Closed

Unnecessary gc root slots in generated code #20981

Keno opened this issue Mar 11, 2017 · 1 comment · Fixed by #21888
Labels
compiler:codegen Generation of LLVM IR and native code GC Garbage collector

Comments

@Keno
Copy link
Member

Keno commented Mar 11, 2017

type foo
    a::Vector{Int64}
end

f(x::foo) = (a = x.a; for i = 1:100; @inbounds a[i] += 1; end)

code_llvm(f, Tuple{foo})

This generates 3 roots. We technically don't need any because there's no safepoints. However, I'd settle for 1 root for now.

@ararslan ararslan added the GC Garbage collector label Mar 11, 2017
@JeffBezanson JeffBezanson added the compiler:codegen Generation of LLVM IR and native code label Mar 12, 2017
Keno added a commit that referenced this issue Mar 24, 2017
See lengthy comment in llvm-gcroot.cpp for a description of the algorithm.
Keno added a commit that referenced this issue Apr 1, 2017
See lengthy comment in llvm-gcroot.cpp for a description of the algorithm.
@yuyichao
Copy link
Contributor

Close as dup of #15369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code GC Garbage collector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants