Skip to content

Query Parallelization Tracking Issue #48685

Closed

Description

@nikomatsakis

This issue is a sub-issue of #48547: it tracks the in-progress effort to parallelize rustc across queries. This work is being spearheaded by @Zoxc.

Goals

Allow rustc to execute queries in parallel with one another. Enable the use of rayon or other tools for intra-query parallelization as well. See this internals thread for more information.

Overview of the plan

Pending refactorings

Completed refactorings

Activity

  1. added
    I-compiletimeIssue: Problems and improvements with respect to compile times.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Mar 2, 2018
  2. nikomatsakis commented on Mar 2, 2018

    @nikomatsakis
    ContributorAuthor
  3. michaelwoerister commented on May 7, 2018

    @michaelwoerister
    Member

    I'm trying to identify the blocking issues for a minimal but correct version of parallel queries. Ideally we would solve all of them over the next few weeks :)

    So far I've found:

    There are a few things that also need to be solved medium term, but they are not blocking yet:

    • Error message handling must be deterministic enough for tests to work (or tests need to handle indeterminism)
    • Various things could be made thread-local or immutable instead of globally shared.
    • Various corner cases (such as optimization fuel) may not work correctly yet.

    @Zoxc, @nikomatsakis, @oli-obk, @eddyb: I'm sure this list does not cover all blockers. Let me know what I forgot :)

  4. Zoxc commented on May 7, 2018

    @Zoxc
    Contributor

    @michaelwoerister We also have to make queries work on a Rayon thread-pool

  5. michaelwoerister commented on May 7, 2018

    @michaelwoerister
    Member

    We also have to make queries work on a Rayon thread-pool

    What exactly does this involve?

  6. Zoxc commented on May 7, 2018

    @Zoxc
    Contributor

    @michaelwoerister We have to make waiting on already executing queries block and also detect and recover from query cycles

  7. michaelwoerister commented on May 7, 2018

    @michaelwoerister
    Member

    Ah, right. The blocking should be easy enough. I have not thought in detail about cycle detection and recovery though.

  8. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on May 16, 2018
  9. michaelwoerister commented on Jul 4, 2018

    @michaelwoerister
    Member

    We have to make waiting on already executing queries block and also detect and recover from query cycles

    Both of these should be implemented by #50699, right?

  10. Zoxc commented on Jul 4, 2018

    @Zoxc
    Contributor
  11. 5 remaining items

  12. SparrowLii commented on Aug 27, 2022

    @SparrowLii
    Member

    @nikomatsakis Some refactoring work has been done. How should we update the task list?

  13. added a commit that references this issue on Sep 14, 2022
  14. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Feb 22, 2023
  15. added
    C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing such
    on Oct 8, 2023
  16. petrochenkov commented on Jun 11, 2026

    @petrochenkov
    Contributor

    Closing this in favor of #113349, that issue tracks more recent development in this area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parallel-compilerArea: parallel compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCI-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-compiler-performanceWorking group: Compiler Performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions