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

Move metadata generation before analysis #64112

Closed
wants to merge 6 commits into from

Commits on Sep 1, 2019

  1. Configuration menu
    Copy the full SHA
    d61605c View commit details
    Browse the repository at this point in the history
  2. Remove lower_to_hir() call from prepare_output().

    It's a false dependency. The result isn't used and there are no
    relevant side-effects.
    nnethercote committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    cd0c21b View commit details
    Browse the repository at this point in the history
  3. Merge Compiler::{ongoing_codegen,link}.

    They each have two call sites, and the sequencing is almost identical in
    both cases.
    nnethercote committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    c6117d9 View commit details
    Browse the repository at this point in the history
  4. Move call site of dep_graph_future().

    `Compiler::register_plugins()` calls `passes::register_plugins()`, which
    calls `Compiler::dep_graph_future()`. This is the only way in which a
    `passes` function calls a `Compiler` function.
    
    This commit moves the `dep_graph_future()` call out of
    `passes::register_plugins()` and into `Compiler::register_plugins()`,
    which is a more sensible spot for it. This will delay the loading of the
    dep graph slightly -- from the middle of plugin registration to the end
    of plugin registration -- but plugin registration is fast enough
    (especially compared to expansion) that the impact should be neglible.
    nnethercote committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    df952ca View commit details
    Browse the repository at this point in the history
  5. Remove Compiler::compile().

    `Compiler::compile()` is different to all the other `Compiler` methods
    because it lacks a `Queries` entry. It only has one call site, which is
    in a test that doesn't need its specific characteristics.
    
    This patch removes `Compile::compile()` and replaces the call to it in
    the test with a call to `Compile::codegen_and_link()`, which is similar
    enough for the test's purposes.
    nnethercote committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    92a0cbd View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2019

  1. [DRAFT] Move metadata generation before analysis.

    The goal of this commit is to improve the effectiveness of pipelining,
    because metadata generation must complete before dependent crates can
    begin compiling.
    
    Unfortunately it's not much of a win. The biggest speed-up I have seen
    is 1.07x, vs 1.79x for the original pipelining implementation. And it
    slightly slows down the common case when an error occurs during
    analysis, because metadata generation now precedes analysis.
    
    Currently three tests fail with the change, due to bounds violations.
    These tests are currently `git rm`'d, so that subsequent tests can run.
    nnethercote committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    c5f5e5b View commit details
    Browse the repository at this point in the history