about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/persist/load.rs
AgeCommit message (Collapse)AuthorLines
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-04Remove unused LoadResult::DecodeIncrCache variantbjorn3-10/+1
2023-10-26Tiny comment fixes.Nicholas Nethercote-1/+1
2023-09-24Don't use a thread to load the dep graphJohn Kåre Alsaker-70/+62
2023-09-21Move `DepKind` to `rustc_query_system` and define it as `u16`John Kåre Alsaker-2/+2
2023-08-13Pass WorkProductMap to build_dep_graph instead of FxIndexMapbjorn3-3/+1
Constructing an FxIndexMap is useless work as the iteration order never matters.
2023-06-05Fixed to_sorted => to_sorted_stable_ordAndrew Xie-1/+1
2023-06-04Fixed failing test + minor cleanupAndrew Xie-1/+1
2023-06-04Switched some uses to UnordMapAndrew Xie-2/+2
2023-06-04Removed use of iteration through a HashMap/HashSet in rustc_incremental and ↵Andrew Xie-3/+3
replaced with IndexMap/IndexSet
2023-05-17Only depend on CFG_VERSION in rustc_interfacejyn-12/+20
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
2023-04-26Remove QueryEngine traitJohn Kåre Alsaker-4/+6
2023-01-30incremental: migrate diagnosticsDavid Wood-30/+24
Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-3/+3
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-06incr: cache dwarf objects in work productsDavid Wood-12/+6
Cache DWARF objects alongside object files in work products when those exist so that DWARF object files are available for thorin in packed mode in incremental scenarios. Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-14Rename rustc_serialize::opaque::Encoder as MemEncoder.Nicholas Nethercote-3/+3
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in #94732 and then was reverted in #97905 because of a perf regression caused by commit 4 in #94732.)
2022-06-10Revert b983e42936feab29f6333e9835913afc6b4a394e.Nicholas Nethercote-3/+3
2022-06-08Rename `rustc_serialize::opaque::Encoder` as `MemEncoder`.Nicholas Nethercote-3/+3
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports).
2022-06-06Make saved_file field of WorkProduct non-optionalbjorn3-11/+9
A WorkProduct without a saved file is useless
2022-03-03all: fix some typoscuishuang-1/+1
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-01-22Make `Decodable` and `Decoder` infallible.Nicholas Nethercote-12/+3
`Decoder` has two impls: - opaque: this impl is already partly infallible, i.e. in some places it currently panics on failure (e.g. if the input is too short, or on a bad `Result` discriminant), and in some places it returns an error (e.g. on a bad `Option` discriminant). The number of places where either happens is surprisingly small, just because the binary representation has very little redundancy and a lot of input reading can occur even on malformed data. - json: this impl is fully fallible, but it's only used (a) for the `.rlink` file production, and there's a `FIXME` comment suggesting it should change to a binary format, and (b) in a few tests in non-fundamental ways. Indeed #85993 is open to remove it entirely. And the top-level places in the compiler that call into decoding just abort on error anyway. So the fallibility is providing little value, and getting rid of it leads to some non-trivial performance improvements. Much of this commit is pretty boring and mechanical. Some notes about a few interesting parts: - The commit removes `Decoder::{Error,error}`. - `InternIteratorElement::intern_with`: the impl for `T` now has the same optimization for small counts that the impl for `Result<T, E>` has, because it's now much hotter. - Decodable impls for SmallVec, LinkedList, VecDeque now all use `collect`, which is nice; the one for `Vec` uses unsafe code, because that gave better perf on some benchmarks.
2021-12-10Rollup merge of #91625 - est31:remove_indexes, r=oli-obkMatthias Krüger-1/+1
Remove redundant [..]s
2021-12-09Remove redundant [..]sest31-1/+1
2021-12-07Document all public items in `rustc_incremental`pierwill-2/+15
Also: - Review and edit current docs - Enforce documentation for crate Co-authored-by: r00ster <r00ster91@protonmail.com> Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
2021-11-12Add `-Zassert-incr-state` to assert state of incremental cachepierwill-1/+23
2021-11-09Remove `rustc_incremental::persist::fs::dep_graph_path_from`pierwill-1/+1
2021-08-28Mmap the incremental data instead of reading it.Camille GILLOT-1/+2
2021-07-18Move OnDiskCache to rustc_query_impl.Camille GILLOT-6/+4
2021-06-30Simplify DepGraph creation.Camille GILLOT-6/+9
2021-06-08Do not require the DefPathTable to construct the on-disk cache.Camille GILLOT-6/+2
2021-05-22Get rid of PreviousDepGraph.Camille GILLOT-5/+5
2021-05-12Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillotbors-3/+3
rustc_driver cleanup Best reviewed one commit at a time.
2021-05-02Let load_query_result_cache take a &DefPathTablebjorn3-3/+3
This allows removing a confusing mem::replace in create_global_ctxt
2021-04-27Add [TRACKED_NO_CRATE_HASH] and [SUBSTRUCT] directivesJoshua Nelson-1/+1
This is necessary for options that should invalidate the incremental hash but *not* affect the crate hash (e.g. --remap-path-prefix). This doesn't add `for_crate_hash` to the trait directly because it's not relevant for *types*, only for *options*, which are fields on a larger struct. Instead, it adds a new `SUBSTRUCT` directive for options, which does take a `for_crate_hash` parameter. - Use TRACKED_NO_CRATE_HASH for --remap-path-prefix - Add test that `remap_path_prefix` is tracked - Reduce duplication in the test suite to avoid future churn
2021-03-30Stream the dep-graph to a file.Camille GILLOT-2/+2
2021-02-18Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.Eduard-Mihai Burtescu-1/+1
2021-01-12Remove DepKind::CrateMetadata and pre-allocation of DepNodesTyson Nottingham-9/+0
Remove much of the special-case handling around crate metadata dependency tracking by replacing `DepKind::CrateMetadata` and the pre-allocation of corresponding `DepNodes` with on-demand invocation of the `crate_hash` query.
2020-11-25Fix rebase falloutAaron Hill-2/+7
2020-11-25Lazy DefPath decoding for incremental compilationAaron Hill-4/+3
2020-11-19Only create `OnDiskCache` in incremental compilation modeAaron Hill-4/+11
This lets us skip doing useless work when we're not in incremental compilation mode.
2020-11-07Allow making `RUSTC_BOOTSTRAP` conditional on the crate nameJoshua Nelson-5/+14
The main change is that `UnstableOptions::from_environment` now requires an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how. Other major changes: - Added `Session::is_nightly_build()`, which uses the `crate_name` of the session - Added `nightly_options::match_is_nightly_build`, a convenience method for looking up `--crate-name` from CLI arguments. `Session::is_nightly_build()`should be preferred where possible, since it will take into account `#![crate_name]` (I think). - Added `unstable_features` to `rustdoc::RenderOptions` There is a user-facing change here: things like `RUSTC_BOOTSTRAP=0` no longer active nightly features. In practice this shouldn't be a big deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone uses `RUSTC_BOOTSTRAP=1` anyway. - Add tests Check against `Cheat`, not whether nightly features are allowed. Nightly features are always allowed on the nightly channel. - Only call `is_nightly_build()` once within a function - Use booleans consistently for rustc_incremental Sessions can't be passed through threads, so `read_file` couldn't take a session. To be consistent, also take a boolean in `write_file_header`.
2020-08-30mv compiler to compiler/mark-0/+208