about summary refs log tree commit diff
path: root/src/librustc_driver/driver.rs
AgeCommit message (Collapse)AuthorLines
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-1244/+0
2019-03-03Wrap the self-profiler in an `Arc<Mutex<>>`Wesley Wiser-8/+0
This will allow us to send it across threads and measure things like LLVM time.
2019-03-01Fix importJohn Kåre Alsaker-0/+1
2019-03-01Add support for using a jobserver with RayonJohn Kåre Alsaker-0/+3
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-463/+25
2019-02-18Fix a transposition in driver.rs.Benjamin Peterson-1/+1
2019-02-13Rollup merge of #58400 - gnzlbg:fix_driver, r=oli-obkMazdak Farrokhzad-0/+5
Fix rustc_driver swallowing errors when compilation is stopped r? @oli-obk
2019-02-12Fix rustc_driver swallowing errors when compilation is stoppedgnzlbg-0/+5
2019-02-10rustc: doc commentsAlexander Regueiro-3/+3
2019-02-07Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoeristerbors-44/+58
Move privacy checking later in the pipeline and make some passes run in parallel r? @michaelwoerister
2019-02-06Overhaul `syntax::fold::Folder`.Nicholas Nethercote-6/+6
This commit changes `syntax::fold::Folder` from a functional style (where most methods take a `T` and produce a new `T`) to a more imperative style (where most methods take and modify a `&mut T`), and renames it `syntax::mut_visit::MutVisitor`. The first benefit is speed. The functional style does not require any reallocations, due to the use of `P::map` and `MoveMap::move_{,flat_}map`. However, every field in the AST must be overwritten; even those fields that are unchanged are overwritten with the same value. This causes a lot of unnecessary memory writes. The imperative style reduces instruction counts by 1--3% across a wide range of workloads, particularly incremental workloads. The second benefit is conciseness; the imperative style is usually more concise. E.g. compare the old functional style: ``` fn fold_abc(&mut self, abc: ABC) { ABC { a: fold_a(abc.a), b: fold_b(abc.b), c: abc.c, } } ``` with the imperative style: ``` fn visit_abc(&mut self, ABC { a, b, c: _ }: &mut ABC) { visit_a(a); visit_b(b); } ``` (The reductions get larger in more complex examples.) Overall, the patch removes over 200 lines of code -- even though the new code has more comments -- and a lot of the remaining lines have fewer characters. Some notes: - The old style used methods called `fold_*`. The new style mostly uses methods called `visit_*`, but there are a few methods that map a `T` to something other than a `T`, which are called `flat_map_*` (`T` maps to multiple `T`s) or `filter_map_*` (`T` maps to 0 or 1 `T`s). - `move_map.rs`/`MoveMap`/`move_map`/`move_flat_map` are renamed `map_in_place.rs`/`MapInPlace`/`map_in_place`/`flat_map_in_place` to reflect their slightly changed signatures. - Although this commit renames the `fold` module as `mut_visit`, it keeps it in the `fold.rs` file, so as not to confuse git. The next commit will rename the file.
2019-01-31Use ensure for mir_borrowckJohn Kåre Alsaker-1/+1
2019-01-30Move privacy checking later in the pipeline and make some passes run in parallelJohn Kåre Alsaker-44/+58
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-3/+3
2019-01-28Conditionally skip two passes if their related attributes were not foundJohn Kåre Alsaker-14/+17
2019-01-26Auto merge of #57726 - Zoxc:combine-early-lints, r=estebankbors-3/+7
Combine all builtin early lints This also adds a -Z no-interleave-lints option to allow benchmarking lints. r? @estebank
2019-01-25distinguish "no data" from "heterogeneous" for ABI purposesNiko Matsakis-1/+4
Also, add a testing infrastructure and tests that lets us dump layout.
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+1
2019-01-19Auto merge of #57752 - Centril:rollup, r=Centrilbors-25/+10
Rollup of 10 pull requests Successful merges: - #57268 (Add a target option "merge-functions", and a corresponding -Z flag (works around #57356)) - #57476 (Move glob map use to query and get rid of CrateAnalysis) - #57501 (High priority resolutions for associated variants) - #57573 (Querify `entry_fn`) - #57610 (Fix nested `?` matchers) - #57634 (Remove an unused function argument) - #57653 (Make the contribution doc reference the guide more) - #57666 (Generalize `huge-enum.rs` test and expected stderr for more cross platform cases) - #57698 (Fix typo bug in DepGraph::try_mark_green().) - #57746 (Update README.md) Failed merges: r? @ghost
2019-01-19Rollup merge of #57573 - Xanewok:querify-entry-fn, r=ZoxcMazdak Farrokhzad-4/+5
Querify `entry_fn` Analogous to https://github.com/rust-lang/rust/pull/57570 but this will also require few fixups in Miri so I decided to separate that (and it seems [CI doesn't let us break tools anymore](https://github.com/rust-lang/rust/pull/57392#issuecomment-453801540)? Or was that because it was a rollup PR?) r? @nikomatsakis
2019-01-19Auto merge of #57253 - Zoxc:incr-passes2, r=michaelwoeristerbors-0/+2
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on https://github.com/rust-lang/rust/pull/51487 r? @michaelwoerister
2019-01-19Combine all builtin early lints and use a separate walk for plugin lints. ↵John Kåre Alsaker-3/+7
Add a -Z no-interleave-lints option to allow benchmarking lints
2019-01-17Querify glob map usage (last use of CrateAnalysis)Igor Matuszewski-21/+5
2019-01-16Auto merge of #57392 - Xanewok:always-calc-glob-map, r=petrochenkovbors-13/+2
Always calculate glob map but only for glob uses Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance. Main motivation is to get rid of some of the moving pieces and simplify the compilation interface - this would allow us to entirely remove `CrateAnalysis`. Later, we could easily expose a relevant query, similar to the likes of `maybe_unused_trait_import` (so using precomputed data from the resolver, but which could be rewritten to be on-demand). r? @nikomatsakis Local perf run showed mostly noise (except `ctfe-stress-*`) but I'd appreciate if we could do a perf run run here and double-check that this won't regress performance.
2019-01-16Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakisbors-16/+10
Implement basic input validation for built-in attributes Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax"). For some subset of attributes (found by crater run), errors are lowered to deprecation warnings. NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.
2019-01-15Querify entry_fnIgor Matuszewski-4/+5
2019-01-15Make privacy checking, intrinsic checking and liveness checking incrementalJohn Kåre Alsaker-0/+2
2019-01-13Retain original pass orderIgor Matuszewski-2/+2
It shouldn't matter, but hey - better safe than sorry!
2019-01-13Querify local plugin_registrar_fnIgor Matuszewski-5/+5
2019-01-13Querify local proc_macro_decls_staticIgor Matuszewski-2/+5
2019-01-13Implement basic input validation for built-in attributesVadim Petrochenkov-16/+10
2019-01-13Always calculate glob map but only for glob usesIgor Matuszewski-13/+2
Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance.
2019-01-11Make more passes incrementalJohn Kåre Alsaker-3/+4
2019-01-07Rollup merge of #57308 - Zoxc:controller-sync, r=michaelwoeristerPietro Albini-3/+4
Make CompileController thread-safe
2019-01-06Make sure feature gate errors are recoverable (take 2)Vadim Petrochenkov-13/+10
2019-01-04Remove unused name from CrateAnalysisIgor Matuszewski-1/+0
2019-01-04Replace CrateAnalysis::access_levels with queryIgor Matuszewski-6/+5
2019-01-03Make CompileController thread-safeJohn Kåre Alsaker-3/+4
2018-12-28Auto merge of #57118 - Zoxc:query-stats, r=wesleywiserbors-0/+4
Add a command line flag to print some query stats r? @michaelwoerister
2018-12-27Do not abort compilation if expansion produces errorsVadim Petrochenkov-10/+0
Fix a number of uncovered deficiencies in diagnostics
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-25Add a command line flag to print some query statsJohn Kåre Alsaker-0/+4
2018-12-19Auto merge of #56601 - Zoxc:lifetime-killer, r=nikomatsakisbors-9/+4
Make the 'a lifetime on TyCtxt useless cc @rust-lang/compiler r? @nikomatsakis
2018-12-19Rollup merge of #56663 - Zoxc:resolver-lifetime, r=pnkfelixPietro Albini-5/+5
Remove lifetime from Resolver
2018-12-13Make the 'a lifetime on TyCtxt uselessJohn Kåre Alsaker-9/+4
2018-12-12Replace `FileSearch::for_each_lib_search_path` with `search_paths`.Nicholas Nethercote-1/+1
Returning an iterator leads to nicer code all around.
2018-12-10Remove lifetime from ResolverJohn Kåre Alsaker-5/+5
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-28/+28
2018-12-07Auto merge of #56502 - Zoxc:hir-func, r=eddybbors-1/+1
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
2018-12-07Unsupport `#[derive(Trait)]` sugar for `#[derive_Trait]` legacy plugin ↵Vadim Petrochenkov-2/+0
attributes