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

ignore module_infer flag when generating a system image #43423

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

JeffBezanson
Copy link
Sponsor Member

Another precompilation improvement. The problem here is that skipping inference of, say, a JLL __init__ method is fine by itself, but at run time that can call another method which we then won't know about. So while we are generating a sysimg anyway, we might as well discover all the possibly-needed methods we can and just ignore the flag.

@JeffBezanson JeffBezanson added the compiler:precompilation Precompilation of modules label Dec 14, 2021
@JeffBezanson JeffBezanson merged commit ae55fb2 into master Jan 3, 2022
@JeffBezanson JeffBezanson deleted the jb/precompile3 branch January 3, 2022 21:02
@@ -903,7 +905,7 @@ function typeinf_ext(interp::AbstractInterpreter, mi::MethodInstance)
end
end
end
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0 && !generating_sysimg()
return retrieve_code_info(mi)
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you holding a lock here? This seems like a bad place for this return to happen. (and also shouldn't it just return nothing, to directly signal that inference failed)

LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants