Skip to content

Commit 1f0700a

Browse files
authored
Precompile cache: always add worklist CIs (#47924)
We cache only those external CodeInstances that link back to the package being precompiled. Formerly we required a backedge; this PRs adds any whose `specTypes` could only link back to the package. This scoops up a few runtime-dispatched CodeInstances and their callees.
1 parent 70c1e45 commit 1f0700a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/staticdata_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static int has_backedge_to_worklist(jl_method_instance_t *mi, htable_t *visited,
167167
if (jl_is_method(mod))
168168
mod = ((jl_method_t*)mod)->module;
169169
assert(jl_is_module(mod));
170-
if (mi->precompiled || !jl_object_in_image((jl_value_t*)mod)) {
170+
if (mi->precompiled || !jl_object_in_image((jl_value_t*)mod) || type_in_worklist(mi->specTypes)) {
171171
return 1;
172172
}
173173
if (!mi->backedges) {

0 commit comments

Comments
 (0)