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

Share ModuleGraphs for all files #3232

Merged
merged 7 commits into from
Aug 4, 2023
Merged

Share ModuleGraphs for all files #3232

merged 7 commits into from
Aug 4, 2023

Commits on Aug 2, 2023

  1. Remove GetDependencyInformation in favour of GetModuleGraph.

    Computing and storing GetDependencyInformation for each file essentially individually means
    that we perform downsweep on each file individually, wasting a lot of work and using an excessive
    amount of memory to store all these duplicated graphs individually.
    
    However, we already have the `GetModuleGraph` rule, which we need to compute before compiling
    files any way due to being depended on by `NeedsCompilation`, which needs to know if any reverse
    dependencies of the module we are compiling requires TH, which meant that each file already depends on
    the results of downsweep for the whole project.
    
    Instead, we can compute the whole graph once when we execute the `GetModuleGraph` rule and even use this inside `HscEnv.hsc_mod_graph` to avoid reconstructing the `ModuleGraph` on each invocation of `GhcSessionDeps`.
    
    There may be concerns about excessive build churn due to any change to the result of `GetModuleGraph`
    invalidating the result of `GhcSessionDeps` too often, but note that this only happens when something
    in the header of a module changes, and this could be solved easily be re-introducing
    a version of `GetDependencyInformation` with early cutoff that essentially returns the result of `GetModuleGraph`
    but includes the hash of only the `ModSummary`s in the downward dependency closure of the file.
    wz1000 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    dee94ac View commit details
    Browse the repository at this point in the history
  2. module graph early cutoff

    early cutoff for eval plugin
    wz1000 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    9891229 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    50914ea View commit details
    Browse the repository at this point in the history
  4. Add new benchmarks to config

    wz1000 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    62d260c View commit details
    Browse the repository at this point in the history
  5. Allow pathToId to fail

    wz1000 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    88d7f7c View commit details
    Browse the repository at this point in the history
  6. Errors

    wz1000 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    9aea2f6 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

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