-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Query Parallelization Tracking Issue #48685
Copy link
Copy link
Open
Labels
A-parallel-compilerArea: parallel compilerArea: parallel compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-compiler-performanceWorking group: Compiler PerformanceWorking group: Compiler Performance
Metadata
Metadata
Assignees
Labels
A-parallel-compilerArea: parallel compilerArea: parallel compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-compiler-performanceWorking group: Compiler PerformanceWorking group: Compiler Performance
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
RefCellusage withMutexPending refactorings
mk_attr_iduse a scoped thread local or make it part ofParseSessGlobalCtxt.rcache,OnDiskCache.file_index_to_fileandOnDiskCache.synthetic_expansion_infosare faster as thread-localsSession.lint_storeandSession.buffered_lintsCompleted refactorings
QueryJobfield. (implemented in Make incremental compilation thread-safe #49732)libproc_macrofor issues, Find out which types should beSend,Sync. Deal withDerefimpls forSymbol. (Decouple proc_macro from the rest of the compiler. #49219)CStore::next_crate_numFileMap.lines,FileMap.multibyte_chars, andFileMap.non_narrow_charsimmutable (implemented in Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable. #50997)DepGraph.try_mark_greenDepGraphData.previous_work_productsso it becomes immutable ([parallel-queries] DepGraph::previous_work_products could be made immutable to avoid shared mutable state #50501) (implemented in Make DepGraph::previous_work_products immutable #50524)DepGraphData.work_productsby threaded the value throughsave_trans_partition() -> copy_module_artifacts_into_incr_comp_cache() -> OngoingCrateTranslation::join()([parallel-queries] Refactor away DepGraph::work_products to avoid shared mutable state #50500) (implemented in Encountered errors[...]resolving bounds after type-checking [rustc 1.28.0-nightly (952f344cd 2018-05-18)] #50885)TransitiveRelationdoesn't really need to use aRefCell. In the future, it won't even be shared, but regardless the caching scheme could be reworked to avoidRefCell(implemented in get rid ofRefCellinTransitiveRelation#99702).GlobalCtxt::layout_depthso it does not need global mutable state ([parallel-queries] Refactor layout-depth tracking so it does not need mutable state in the GlobalCtxt #49735) (implemented in adddepth_limitinQueryVTableto avoid entering a new tcx inlayout_of#100748)