about summary refs log tree commit diff
path: root/src/librustc_interface
AgeCommit message (Collapse)AuthorLines
2019-10-14Rollup merge of #65340 - bjorn3:cg_ssa_refactor4, r=eddybTyler Mandry-0/+3
Several changes to the codegen backend organization * Split functions from values in cg_ssa `BackendTypes`. * Remove `is_const_integral` function from `ConstMethods`. * Actually register the invalid monomorphization of intrinsic long diagnostic and remove the `diagnostics` method from `CodegenBackends`, as it was unused. * Add cg_ssa and cg_utils provided methods to `default_provide`, so codegen backend don't have to do it themself.
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-0/+2
Use a more traditional scheme with providing them as a resolver output
2019-10-14rustc_metadata: Crate loader is immutableVadim Petrochenkov-3/+3
2019-10-14rustc_metadata: Privatize private code and remove dead codeVadim Petrochenkov-8/+7
2019-10-13lowering: connect to parser via function pointer insteadMazdak Farrokhzad-16/+4
2019-10-13lowering: don't rely on parser directly.Mazdak Farrokhzad-3/+16
2019-10-13Add top level provide/provide_extern to cg_ssa and cg_utilsbjorn3-5/+3
2019-10-13Move some provides from cg_llvm to rustc_interfacebjorn3-0/+5
2019-10-09self-profiling: Add events for everything except trait selection.Michael Woerister-0/+2
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-614/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-07Name the threads in rayon's poolJosh Stone-0/+1
2019-10-07Rebase rustc-rayon on rayon-1.2Josh Stone-5/+5
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-04middle::intrinsicck -> rustc_passesMark Rousskov-1/+0
2019-10-04middle::entry -> rustc_passesMark Rousskov-2/+1
2019-10-04middle::dead -> rustc_passesMark Rousskov-1/+1
2019-10-04move middle::liveness to rustc_passesMark Rousskov-1/+0
2019-10-04Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddybMazdak Farrokhzad-2/+1
Simplify ExprUseVisitor * Remove HIR const qualification * Remove parts of ExprUseVisitor that aren't being used r? @eddyb
2019-10-03Remove -Zprofile-queriesMark Rousskov-614/+1
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-12/+12
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-10-01Rollup merge of #64722 - Mark-Simulacrum:alt-parallel, r=alexcrichtonTyler Mandry-4/+7
Make all alt builders produce parallel-enabled compilers We're not quite ready to ship parallel compilers by default, but the alt builders are not used too much (in theory), so we believe that shipping a possibly-broken compiler there is not too problematic. r? @nikomatsakis
2019-09-30Make the default parallelism 1Mark Rousskov-4/+7
This changes the default parallelism for parallel compilers to one, instead of the previous default, which was "num cpus". This is likely not an optimal default long-term, but it is a good default for testing whether parallel compilers are not a significant regression over a sequential compiler. Notably, this in theory makes a parallel-enabled compiler behave exactly like a sequential compiler with respect to the jobserver.
2019-09-30Remove HIR based const qualificationMatthew Jasper-2/+1
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-12/+12
2019-09-30Fixed grammar for some `time` fn calls and a diagnostic.Alexander Regueiro-8/+8
2019-09-29Auto merge of #64158 - tmandry:libtest-panic-abort, r=alexcrichtonbors-0/+3
panic=abort support in libtest Add experimental support for tests compiled with panic=abort. Enabled with `-Z panic_abort_tests`. r? @alexcrichton cc @cramertj
2019-09-28Put panic=abort test support behind -Z panic_abort_testsTyler Mandry-0/+2
2019-09-28Spawn one subprocess per unit test when panic=abortTyler Mandry-0/+1
2019-09-28Switch over all StableHash impls to new formatMark Rousskov-2/+2
2019-09-27don't borrowck::check_crate(tcx) anymore.Mazdak Farrokhzad-8/+0
2019-09-27Remove librustc_ast_borrowck from driver & interface.Mazdak Farrokhzad-1/+0
2019-09-27Auto merge of #64813 - varkor:node-to-kind, r=Centrilbors-8/+8
Rename `*.node` to `*.kind`, and `hair::Pattern*` to `hair::Pat*` In both `ast::Expr` and `hir::Expr`: - Rename `Expr.node` to `Expr.kind`. - Rename `Pat.node` to `Pat.kind`. - Rename `ImplItem.node` to `ImplItem.kind`. - Rename `Lit.node` to `Lit.kind`. - Rename `TraitItem.node` to `TraitItem.kind`. - Rename `Ty.node` to `Ty.kind`. - Rename `Stmt.node` to `Stmt.kind`. - Rename `Item.node` to `Item.kind`. - Rename `ForeignItem.node` to `ForeignItem.kind`. - Rename `MetaItem.node` to `MetaItem.kind`. Also: - Rename `hair::FieldPattern` to `hair::FieldPat`. - Rename `hair::PatternKind` to `hair::PatKind`. - Rename `hair::PatternRange` to `hair::PatRange`. - Rename `PatternContext` to `PatCtxt`. - Rename `PatternTypeProjection` to `PatTyProj`. - Rename `hair::Pattern` to `hair::Pat`. These two sets of changes are grouped together to aid with merging. The only changes are renamings. r? @petrochenkov
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-1/+1
2019-09-26Rename `Stmt.node` to `Stmt.kind`varkor-2/+2
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-1/+1
2019-09-26Rename `TraitItem.node` to `TraitItem.kind`varkor-1/+1
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-1/+1
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-2/+2
For both `ast::Expr` and `hir::Expr`.
2019-09-25Remove tx_to_llvm_workers from TyCtxtMark Rousskov-20/+1
This can be kept within the codegen backend crates entirely
2019-09-25Rollup merge of #62975 - ljedrz:kill_off_hir_to_node_id, r=ZoxcMazdak Farrokhzad-7/+8
Almost fully deprecate hir::map::Map.hir_to_node_id - HirIdify `doctree::Module.id` - HirIdify `hir::Crate.modules` - introduce a `HirId` to `DefIndex` map in `map::Definitions` The only last uses of `hir::map::Map.hir_to_node_id` in the compiler are: - for the purposes of `driver::pretty` (in `map::nodes_matching_suffix`), but I don't know if we can remove `NodeId`s in there (I think when I attempted it previously there was some issue due to `HirId` not being representable with an integer) - in `ty::query::on_disk_cache` (not sure about the purpose of this one) - in `mir::transform::check_unsafety` (only important for error message order) Any suggestions how to kill these off? r? @Zoxc
2019-09-25Rollup merge of #64324 - alexcrichton:share-generics-again, r=michaelwoeristerMazdak Farrokhzad-4/+0
rustc: Fix mixing crates with different `share_generics` This commit addresses #64319 by removing the `dylib` crate type from the list of crate type that exports generic symbols. The bug in #64319 arises because a `dylib` crate type was trying to export a symbol in an uptream crate but it miscalculated the symbol name of the uptream symbol. This isn't really necessary, though, since `dylib` crates aren't that heavily used, so we can just conservatively say that the `dylib` crate type never exports generic symbols, forcibly removing them from the exported symbol lists if were to otherwise find them. The fix here happens in two places: * First is in the `local_crate_exports_generics` method, indicating that it's now `false` for the `Dylib` crate type. Only rlibs actually export generics at this point. * Next is when we load exported symbols from upstream crate. If, for our compilation session, the crate may be included from a dynamic library, then its generic symbols are removed. When the crate was linked into a dynamic library its symbols weren't exported, so we can't consider them a candidate to link against. Overally this should avoid situations where we incorrectly calculate the upstream symbol names in the face of differnet `share_generics` options, ultimately... Closes #64319
2019-09-24Rollup merge of #64016 - nnethercote:Compiler-fiddling, r=oli-obkMazdak Farrokhzad-20/+29
Streamline `Compiler` A few commits to clean up `Compiler`. r? @Zoxc
2019-09-23rustc: Convert `dependency_formats` to a queryAlex Crichton-4/+0
This commit converts a field of `Session`, `dependency_formats`, into a query of `TyCtxt`. This information then also needed to be threaded through to other remaining portions of the linker, but it's relatively straightforward. The only change here is that instead of `HashMap<CrateType, T>` the data structure changed to `Vec<(CrateType, T)>` to make it easier to deal with in queries.
2019-09-19Add a comment to `Compiler::compile()`.Nicholas Nethercote-2/+7
`Compiler::compile()` is different to all the other `Compiler` methods because it lacks a `Queries` entry. It only has one call site, which is in a test that doesn't need its specific characteristics. This patch replaces that call with a call to `Compile::link()`, which is similar enough for the test's purposes. It also notes that the method is an illustrative example of how `Compiler` can be used.
2019-09-14feature_gate: Remove dead code from attribute checkingVadim Petrochenkov-9/+2
Same checks are performed during name resolution, and all attributes go through name resolution now
2019-09-11Move call site of `dep_graph_future()`.Nicholas Nethercote-7/+11
`Compiler::register_plugins()` calls `passes::register_plugins()`, which calls `Compiler::dep_graph_future()`. This is the only way in which a `passes` function calls a `Compiler` function. This commit moves the `dep_graph_future()` call out of `passes::register_plugins()` and into `Compiler::register_plugins()`, which is a more sensible spot for it. This will delay the loading of the dep graph slightly -- from the middle of plugin registration to the end of plugin registration -- but plugin registration is fast enough (especially compared to expansion) that the impact should be neglible.
2019-09-10Locate rustc binary similarly to codegen backend loadingMark Rousskov-74/+115
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
2019-09-07Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkovMazdak Farrokhzad-25/+10
Migrate internal diagnostic registration to macro_rules Review is best done commit-by-commit. Fixes #64132.
2019-09-07Rollup merge of #64243 - petrochenkov:cmdattr, r=alexcrichtonMazdak Farrokhzad-1/+3
Move injection of attributes from command line to `libsyntax_ext` Just a tiny bit of code generation that wasn't moved into `libsyntax_ext` in https://github.com/rust-lang/rust/pull/62771.
2019-09-07Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkovMazdak Farrokhzad-11/+16
Use hygiene for AST passes AST passes are now able to have resolve consider their expansions as if they were opaque macros defined either in some module in the current crate, or a fake empty module with `#[no_implicit_prelude]`. * Add an ExpnKind for AST passes. * Remove gensyms in AST passes. * Remove gensyms in`#[test]`, `#[bench]` and `#[test_case]`. * Allow opaque macros to define tests. * Move tests for unit tests to their own directory. * Remove `Ident::{gensym, is_gensymed}` - `Ident::gensym_if_underscore` still exists. cc #60869, #61019 r? @petrochenkov
2019-09-06Move injection of attributes from command line to `libsyntax_ext`Vadim Petrochenkov-1/+3