about summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
2020-05-01Don't copy bytecode files into the incr. comp. cache.Nicholas Nethercote-15/+11
It's no longer necessary now that bitcode is embedded into object files. This change meant that `WorkProductFileKind::Bytecode` is no longer necessary, which means that type is no longer necessary, which allowed several places in the code to become simpler.
2020-04-29Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercotebors-1/+0
Store LLVM bitcode in object files, not compressed This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-29Store LLVM bitcode in object files, not compressedAlex Crichton-1/+0
This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-5/+5
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-10/+10
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-17/+17
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-2/+2
2020-03-25Auto merge of #70297 - nnethercote:clean-up-debugging-options, ↵bors-6/+4
r=michaelwoerister Clean up debugging options I found various sub-optimal things when I was looking at option handling.
2020-03-24Remove `-Z incremental-queries`.Nicholas Nethercote-6/+4
Because it uses `parse_bool` and defaults to true, it is actually impossible to set it to false. And it hasn't been experimental for some time now.
2020-03-23Put extract_def_id back on DepNode.Camille GILLOT-2/+2
2020-03-23Fallout in other crates.Camille GILLOT-3/+3
2020-03-21Rollup merge of #70092 - eddyb:hir-items-are-just-nodes, r=ZoxcMazdak Farrokhzad-2/+2
hir: replace "items" terminology with "nodes" where appropriate. The newly added `HirOwnerItems` confused me before I realized that "items" there actually referred to HIR nodes, not `hir:Item` or "item-like" (which we should IMO replace with "owner"). I suspect the naming had something to do with `ItemLocalId`'s use of "item". That is, `ItemLocalId` could be interpreted to mean one of two things: * `IntraItemNodeId` i.e. `IntraOwnerNodeId` * this is IMO correct, and I'd even like to rename it, but I didn't want to throw that into this PR * `IntraOwnerItemId` * this is what `HirOwnerItems` would seem to imply r? @Zoxc cc @michaelwoerister @nikomatsakis
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-2/+1
2020-03-19hir: replace "items" terminology with "nodes" where appropriate.Eduard-Mihai Burtescu-2/+2
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-5/+5
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-5/+5
2020-03-15More Method->Fn renamingMark Mansi-1/+1
2020-03-14Replace `HirBody` with `hir_owner_items` in testsJohn Kåre Alsaker-2/+3
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-4/+4
2020-03-14Remove `Hir` and `HirBody` dep nodesJohn Kåre Alsaker-3/+2
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-1/+1
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-2/+2
2020-03-14Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddybYuki Okushi-2/+2
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-2/+2
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-2/+2
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-1/+1
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc #69498 #60163
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-1/+1
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-2/+2
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-1/+1
2020-03-05Use more efficient &&str to String conversion (clippy::inefficient_to_string)Matthias Krüger-1/+2
2020-03-03rename TraitItemKind::Method -> FnMark Mansi-1/+1
2020-03-03use question mark operator in a few places.Matthias Krüger-3/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-5/+5
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-28Rollup merge of #69541 - dotdash:format, r=Mark-SimulacrumMazdak Farrokhzad-8/+2
Remove unneeded calls to format!()
2020-02-27Remove unneeded calls to format!()Björn Steinbrink-8/+2
2020-02-27use char instead of &str for single char patternsMatthias Krüger-4/+4
2020-02-19Make is_object_safe a method.Camille GILLOT-1/+1
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-1/+0
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-07Remove unused feature gate from librustc_incrementalbjorn3-1/+0
2020-02-04fix couple of perf related clipyp warningsMatthias Krüger-2/+1
librustc: don't clone a type that is copy librustc_incremental: use faster vector initialization librustc_typeck: don't clone a type that is copy librustdoc: don't create a vector where a slice will do
2020-02-01Use BufWriterShotaro Yamada-2/+2
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-1/+1
2020-01-16don't clone types that are copyMatthias Krüger-1/+1
found via clippy
2020-01-09Label unmarked timeJohn Kåre Alsaker-0/+6
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-7/+8
2020-01-08normalize rustc::hir::intravisit importsMazdak Farrokhzad-2/+2
2020-01-08intravisit: abstract over HIR MapMazdak Farrokhzad-2/+8
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-8/+9
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-46/+31