-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
precompile_utils: Don't auto-enqueue macro
methods for pre-compilation
#57833
base: master
Are you sure you want to change the base?
Conversation
Despite disabling the runtime from compiling `macro` functions in `gf.c`, the pre-compilation code was adding macro code anyway to the workqueue.
macro
methods for pre-compilationmacro
methods for pre-compilation
@JeffBezanson What do you think about deleting the auto- Does it serve any purpose if we are generally not compiling this code anyways? |
This behavior only affects the sysimage, not pkgimages so to avoid creating a standalone sysimage test just for this phenomenon, just verify that we don't have unexpected `macro` code cached in the sysimage.
Does these mean macro methods don't get precompiled at all? Isn't that desirable to avoid having to precompile them at every first use? |
Yes let's try removing the inserted |
macros do not get used at runtime, so including them in the precompile files is (mostly) a waste of space (as is specializing them) |
@@ -170,6 +170,10 @@ static void jl_compile_all_defs(jl_array_t *mis, int all) | |||
size_t i, l = jl_array_nrows(allmeths); | |||
for (i = 0; i < l; i++) { | |||
jl_method_t *m = (jl_method_t*)jl_array_ptr_ref(allmeths, i); | |||
int is_macro_method = jl_symbol_name(m->name)[0] == '@'; | |||
if (is_macro_method) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (is_macro_method) | |
if (is_macro_method && !all) |
OK, it's certainly possible that no noticeable latency improvements come from precompiling macros. |
Despite disabling these from being compiled in
gf.c
for dynamic invocations, the pre-compilation code was addingmacro
Methods anyway to the workqueue.Replaces #57782