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

Make rustc thread safe when queries can be used #46596

Closed
3 of 16 tasks
Zoxc opened this issue Dec 9, 2017 · 1 comment
Closed
3 of 16 tasks

Make rustc thread safe when queries can be used #46596

Zoxc opened this issue Dec 9, 2017 · 1 comment
Assignees
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Dec 9, 2017

This is just an issue noting down the things required to make rustc thread safe when queries can be used.

  • Make GlobalCtxt implement Sync
  • Use scoped thread locals instead of globals, WIP: Less globals #46193
  • Misc fixes required to use a rayon thread pool, WIP: Parallelize passes using rayon #46564
  • Ensure metadata loaded by LlvmMetadataLoader does not get freed on the wrong thread
  • CurrentDepGraph.task_stack has to be made a QueryJob field.
  • ParseSess.included_mod_stack might be problematic
  • Check that optimization fuel is not used with parallel queries
  • Ensure that the err_count() API is not used to discover if errors happen in parallel code
  • Find a way to order error messages deterministically so that if a query depends on another query, its error messages appear after the other query
  • Make mk_attr_id use a scoped thread local or make it part of ParseSess
  • See if we can get rid of locks on TransitiveRelation once old borrowck is gone
  • Review libproc_macro for issues, Find out which types should be Send, Sync. Deal with Deref impls for Symbol.
  • Run CI with cfg(parallel_queries)
  • Refactor away CStore::next_crate_num
  • Refactor away FileMap.external_src, FileMap.lines, FileMap.multibyte_chars, and FileMap.non_narrow_chars
  • When executing queries, instead of keeping around a lock to the query map, create a job object immediately instead
@Zoxc Zoxc self-assigned this Dec 9, 2017
@kennytm kennytm added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 12, 2017
@michaelwoerister
Copy link
Member

Copied the items from this issue into #48685.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants