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

Cache external CodeInstances #43990

Merged
merged 7 commits into from
Feb 24, 2022
Merged

Cache external CodeInstances #43990

merged 7 commits into from
Feb 24, 2022

Commits on Feb 17, 2022

  1. Serialize external CodeInstances

    Prior to this PR, Julia's precompiled `*.ji` files saved just two
    categories of code: unspecialized method definitions and
    type-specialized code for the methods defined by the package.  Any
    novel specializations needed from other code (Base, other packages)
    were not saved, and therefore effectively thrown away.
    
    This PR caches all the code---internal or external---called during
    package definition that hadn't been previously inferred. This makes
    precompilation more intuitive (now it saves all relevant inference
    results), and substantially reduces latency for inference-bound
    packages.
    
    Closes #42016
    Fixes #35972
    
    Issue #35972 arose because codegen got started without re-inferring
    some discarded CodeInstances. This forced the compiler to insert a
    `jl_invoke`. This PR fixes the issue because needed CodeInstances are
    no longer discarded by precompilation.
    timholy committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    b44a8fc View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2022

  1. Fix a failure to invalidate

    Also adds a more stringent invalidation test
    timholy committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    46db20e View commit details
    Browse the repository at this point in the history
  2. Exclude MethodInstances that don't link to worklist module

    This should prevent us from serializing too much code.
    timholy committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    1f2779a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    99c761d View commit details
    Browse the repository at this point in the history
  4. Fix 32-bit bug

    timholy committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    1e05745 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0844855 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2022

  1. Configuration menu
    Copy the full SHA
    c9d54a2 View commit details
    Browse the repository at this point in the history