about summary refs log tree commit diff
path: root/src/librustc_driver/driver.rs
AgeCommit message (Collapse)AuthorLines
2017-09-23Allow writing metadata without llvmbjorn3-1/+2
2017-09-20incr.comp.: Remove IncrementalHashesMap and calculate_svh module.Michael Woerister-18/+8
2017-09-20incr.comp.: Store result fingerprints in DepGraph.Michael Woerister-1/+1
2017-09-18incr.comp.: Remove tcx from StableHashingContext.Michael Woerister-1/+1
2017-09-17rustc: Move codegen to a queryAlex Crichton-10/+15
This commit moves the actual code generation in the compiler behind a query keyed by a codegen unit's name. This ended up entailing quite a few internal refactorings to enable this, along with a few cut corners: * The `OutputFilenames` structure is now tracked in the `TyCtxt` as it affects a whole bunch of trans and such. This is now behind a query and threaded into the construction of the `TyCtxt`. * The `TyCtxt` now has a channel "out the back" intended to send data to worker threads in rustc_trans. This is used as a sort of side effect of the codegen query but morally what's happening here is the return value of the query (currently unit but morally a path) is only valid once the background threads have all finished. * Dispatching work items to the codegen threads was refactored to only rely on data in `TyCtxt`, which mostly just involved refactoring where data was stored, moving it from the translation thread to the controller thread's `CodegenContext` or the like. * A new thread locals was introduced in trans to work around the query system. This is used in the implementation of `assert_module_sources` which looks like an artifact of the old query system and will presumably go away once red/green is up and running.
2017-09-17rustc: Attach an mpsc channel to TyCtxtAlex Crichton-6/+15
This commit attaches a channel to the LLVM workers to the `TyCtxt` which will later be used during the codegen query to actually send work to LLVM workers. Otherwise this commit is just plumbing this channel throughout the compiler to ensure it reaches the right consumers.
2017-09-17rustc: Calculate `ExportedSymbols` in a queryAlex Crichton-2/+2
This commit moves the definition of the `ExportedSymbols` structure to the `rustc` crate and then creates a query that'll be used to construct the `ExportedSymbols` set. This in turn uses the reachablity query exposed in the previous commit.
2017-09-17rustc: Use reachablility through a queryAlex Crichton-10/+2
Turns out this was already set up as a query, just wasn't using it yet!
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-10/+26
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-12rustc: Make `CrateStore` private to `TyCtxt`Alex Crichton-3/+1
This commit removes the `cstore_untracked` method, making the `CrateStore` trait object entirely private to the `ty/context.rs` module.
2017-09-12Remove the `cstore` reference from Session in order to prepare encapsulating ↵Michael Woerister-8/+18
CrateStore access in tcx.
2017-09-05rustc: Move stability functionality into queriesAlex Crichton-7/+0
This commit primarily removes the `stability` field from `TyCtxt` as well as its internal mutable state, instead using a query to build the stability index as well as primarily using queries for other related lookups. Like previous commits the calculation of the stability index is wrapped in a `with_ignore` node to avoid regressing the current tests, and otherwise this commit also introduces #44232 but somewhat intentionally so.
2017-09-05rustc: Migrate lang items to a queryAlex Crichton-7/+0
This commit moves the calculation of the `LanguageItems` structure into a query rather than being calculated before the `TyCtxt` exists, with the eventual end goal of removing some `CrateStore` methods.
2017-09-05rustc: Remove a number of mutable fields in cstoreAlex Crichton-1/+0
This commit started by moving methods from `CrateStore` to queries, but it ended up necessitating some deeper refactorings to move more items in general to queries. Before this commit the *resolver* would walk over the AST and process foreign modules (`extern { .. }` blocks) and collect `#[link]` annotations. It would then also process the command line `-l` directives and such. This information was then stored as precalculated lists in the `CrateStore` object for iterating over later. After this, commit, however, this pass no longer happens during resolution but now instead happens through queries. A query for the linked libraries of a crate will crawl the crate for `extern` blocks and then process the linkage annotations at that time.
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-0/+1
2017-08-27Move unused-extern-crate to late passTatsuyuki Ishi-0/+1
2017-08-25Merge remote-tracking branch 'origin/master' into genAlex Crichton-4/+18
2017-08-24Auto merge of #43345 - matthewhammer:master, r=nikomatsakisbors-0/+14
Profile queries This PR implements the "profile queries" debugging feature described here: https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md In particular, it implements the debugging flag `-Z profile-queries` FYI: This PR is my second attempt at pushing these changes. My original PR required a rebase; I have now done that rebase manually, after messing up with git's "interactive" rebase support. The original (now closed/cancelled) PR is this one: https://github.com/rust-lang/rust/issues/43156 r? @nikomatsakis
2017-08-24Auto merge of #43532 - petrochenkov:pgargs, r=nikomatsakisbors-4/+4
Desugar parenthesized generic arguments in HIR Fixes ICE in https://github.com/rust-lang/rust/issues/43431 and maybe some other similar issues. r? @eddyb
2017-08-23-Z profile-query-and-key, separate from -Z profile-query; query key is ↵Matthew Hammer-3/+3
string option
2017-08-23inc comp: -Z profile-queries support; see also ↵Matthew Hammer-0/+14
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-4/+4
2017-08-21Remove the `rustc_mir::transform` entry point for mir-borrowck.Felix S. Klock II-4/+0
2017-08-21Expose mir-borrowck via a query.Felix S. Klock II-0/+4
(A followup commit removes the mir::transform based entry point.)
2017-08-19Desugar parenthesized generic arguments in HIRVadim Petrochenkov-4/+4
2017-08-17Merge remote-tracking branch 'origin/master' into genAlex Crichton-1/+1
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-0/+9
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-3/+3
2017-08-16Moved mir-borrowck pass down to where comments say it should be.Felix S. Klock II-1/+9
Added two fixmes: The `SimplifyBranches` pass cannot stay where it is, and `BorrowckMir` should be a query, not a pass. But I am going to leave those changes to a future PR.
2017-08-16MIR based borrow check (opt-in).Felix S. Klock II-0/+1
One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute to opt into MIR based borrow checking. Note that regardless of whether one opts in or not, AST-based borrow check will still run as well. The errors emitted from AST-based borrow check will include a "(Ast)" suffix in their error message, while the errors emitted from MIR-based borrow check will include a "(Mir)" suffix. post-rebase: removed check for intra-statement mutual conflict; replaced with assertion checking that at most one borrow is generated per statement. post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-3/+3
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-08-14Merge remote-tracking branch 'origin/master' into genAlex Crichton-37/+29
2017-08-14Auto merge of #43842 - bjorn3:no_llvm_cleanup, r=alexcrichtonbors-35/+27
Cleanup for "Support compiling rustc without LLVM (try 2)" This includes a small patch to allow running tests without llvm. Also check if you are not trying to compile a dylib. cc #42932 r? @alexcrichton
2017-08-13Fix errorbjorn3-0/+1
2017-08-13Update driver.rsbjorn3-1/+1
2017-08-13Change a #[cfg()] to a cfg!()bjorn3-2/+1
2017-08-13Fix tidy errorsbjorn3-1/+1
2017-08-13Remove some more cfg'sbjorn3-28/+27
2017-08-12Fix some typosBastien Orivel-1/+1
2017-08-12Less cfg'sbjorn3-7/+0
2017-08-12Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperiobors-1/+1
Fix some typos I wrote a really naive script and found those typos in the documentation.
2017-08-12Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-27/+73
# Conflicts: # src/librustc_mir/build/scope.rs
2017-08-11Merge remote-tracking branch 'origin/master' into genAlex Crichton-7/+6
2017-08-11Auto merge of #42932 - bjorn3:no_llvm_try2, r=eddybbors-27/+73
Support compiling rustc without LLVM (try 2) Now doesn't change rustc_driver. Supersedes #42752
2017-08-11Auto merge of #43748 - RalfJung:mir-validate2, r=arielb1bors-5/+6
AddValidation: handle Call terminators into blocks that have multiple incoming edges The old code was just wrong: It would add validation on paths that don't even come from the call, and it would add multiple validations if multiple calls end return to the same block.
2017-08-11It now completely compiles without LLVM!!!bjorn3-7/+31
2017-08-11Actually make rustc_driver compile without llvmbjorn3-26/+48
2017-08-11Fix some more typos, this time words that are duplicated.Bastien Orivel-1/+1