Camille GILLOT
c5c935af92
Simplify tracking the encoder state.
2021-03-30 18:10:07 +02:00
Camille GILLOT
e1c99e5fcc
Remove the parallel version.
2021-03-30 18:10:06 +02:00
Camille GILLOT
8208872fa2
Fix parallel compiler.
2021-03-30 18:10:06 +02:00
Camille GILLOT
cfe786e5e0
Fix tests.
...
Avoid invoking queries inside `check_paths`, since we are holding a lock
to the reconstructed graph.
2021-03-30 18:10:06 +02:00
Camille GILLOT
39b306a53d
Do not allocate in decoder.
2021-03-30 18:10:05 +02:00
Camille GILLOT
6bfaf3a9cb
Stream the dep-graph to a file.
2021-03-30 18:09:59 +02:00
Joshua Nelson
441dc3640a
Remove (lots of) dead code
...
Found with https://github.com/est31/warnalyzer .
Dubious changes:
- Is anyone else using rustc_apfloat? I feel weird completely deleting
x87 support.
- Maybe some of the dead code in rustc_data_structures, in case someone
wants to use it in the future?
- Don't change rustc_serialize
I plan to scrap most of the json module in the near future (see
https://github.com/rust-lang/compiler-team/issues/418 ) and fixing the
tests needed more work than I expected.
TODO: check if any of the comments on the deleted code should be kept.
2021-03-27 22:16:33 -04:00
Josh Stone
72ebebe474
Use iter::zip in compiler/
2021-03-26 09:32:31 -07:00
Aaron Hill
443cef5618
Debug-print result when an unstable fingerprint is detected
2021-03-19 21:47:57 -04:00
bors
e7e1dc158c
Auto merge of #83007 - Aaron1011:incr-verify-default, r=Mark-Simulacrum
...
Turn `-Z incremental-verify-ich` on by default
Issue #82920 showed that the kind of bugs caught by this flag have
soundness implications.
2021-03-13 17:52:22 +00:00
Aaron Hill
7d7c81a114
Always run incremental_verify_ich
when re-computing query results
...
Issue #82920 showed that the kind of bugs caught by this flag have
soundness implications.
This causes performance regressions of up to 15.2% during incremental
compilation, but this is necessary to catch miscompilations caused by
bugs in query implementations.
2021-03-13 12:00:38 -05:00
Tyson Nottingham
adcbe49b16
rustc_query_system: simplify QueryCache::iter
...
Minor cleanup to reduce a small amount of complexity and code bloat.
Reduces the number of mono items in rustc_query_impl by 15%.
2021-03-12 17:34:14 -08:00
Camille GILLOT
903f65f215
Simplify hashing.
2021-02-21 12:22:22 +01:00
Camille GILLOT
a87de890fd
Move print_query_stack to rustc_query_system.
2021-02-20 23:40:56 +01:00
Camille GILLOT
c26d965714
Move report_cycle to rustc_query_system.
...
The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame.
2021-02-20 23:36:31 +01:00
Camille GILLOT
3897395787
Move Query to rustc_query_system.
...
Rename it to QueryStackFrame and document a bit.
2021-02-20 22:53:47 +01:00
Camille GILLOT
0144d6a3b7
Do not hold query key in Query.
2021-02-20 22:53:46 +01:00
Camille GILLOT
f96e960ccf
Access the session directly from DepContext.
2021-02-20 22:53:46 +01:00
Camille GILLOT
b27266fdb2
Use a QueryContext for try_mark_green.
2021-02-19 17:51:56 +01:00
Camille GILLOT
ea3d465c95
Move try_load_from_on_disk_cache to the QueryContext.
2021-02-19 17:51:55 +01:00
Camille GILLOT
49c1b07a9e
Decouple QueryContext from DepContext.
2021-02-19 17:51:49 +01:00
Camille GILLOT
6f04883023
Remove QueryAccessors::to_dep_node.
2021-02-19 17:51:49 +01:00
Camille GILLOT
211b05aef3
Don't require a QueryContext to access the DepGraph.
2021-02-19 17:51:49 +01:00
Eduard-Mihai Burtescu
6165d1cc72
Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.
2021-02-18 14:13:38 +02:00
Tomasz Miąsko
db36db2e81
Inline try_get_cached
2021-02-16 00:00:00 +00:00
Camille GILLOT
3fc8ed68e9
Check query cache before calling into the query engine.
2021-02-13 21:14:58 +01:00
Camille GILLOT
280a2866d5
Drop the cache lock earlier.
2021-02-13 21:14:58 +01:00
Camille GILLOT
15b0bc6b83
Separate the query cache from the query state.
2021-02-13 21:14:58 +01:00
Camille GILLOT
9f46259a75
Return a Result for query cache.
2021-02-13 21:14:58 +01:00
Camille GILLOT
8684e9e47d
Merge {get,ensure}_query.
2021-02-13 21:14:57 +01:00
bors
097bc6a84f
Auto merge of #81892 - jyn514:no-inline, r=cjgillot
...
[experiment] remove `#[inline]` from rustc_query_system::plumbing
These functions have a ton of generic parameters and are instantiated
over and over again. Hopefully this will reduce binary bloat and speed
up bootstrapping times.
r? `@cjgillot`
2021-02-09 18:37:33 +00:00
Mark Rousskov
f564d7abba
Switch query descriptions to just String
...
In practice we never used the borrowed variant anyway.
2021-02-08 17:20:41 -05:00
Joshua Nelson
4f77a1afc2
[experiment] remove #[inline]
from rustc_query_system::plumbing
...
These functions have a ton of generic parameters and are instantiated
over and over again. Hopefully this will reduce binary bloat and speed
up bootstrapping times.
2021-02-08 14:57:15 -05:00
bors
a8f7075532
Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
...
Enforce that query results implement Debug
Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk.
This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.
2021-01-26 05:47:23 +00:00
bors
c5a96fb797
Auto merge of #80957 - tgnottingham:direct_serialize_depgraph, r=michaelwoerister
...
Serialize dependency graph directly from DepGraph
Reduce memory usage by serializing dep graph directly from `DepGraph`,
rather than copying it into `SerializedDepGraph` and serializing that.
2021-01-19 19:36:41 +00:00
Aaron Hill
056fbbf7ee
Undo assertion change
2021-01-16 21:37:53 -05:00
Aaron Hill
6417760632
Run fmt
2021-01-16 17:53:02 -05:00
Aaron Hill
93ab705655
Print result on unstable fingerprint error
2021-01-16 17:53:02 -05:00
Aaron Hill
7afb32557d
Enforce that query results implement Debug
2021-01-16 17:53:02 -05:00
LingMan
a56bffb4f9
Use Option::map_or instead of .map(..).unwrap_or(..)
2021-01-14 19:23:59 +01:00
Tyson Nottingham
09067db8a0
Serialize dependency graph directly from DepGraph
...
Reduce memory usage by serializing dep graph directly from `DepGraph`,
rather than copying it into `SerializedDepGraph` and serializing that.
2021-01-12 22:20:29 -08:00
Joshua Nelson
0215b3a456
Don't mark force_query_with_job
as inline(always)
...
It's rather large, and using `inline(always)` forces it to be recompiled
in each calling crate.
2021-01-08 18:38:33 -05:00
Camille GILLOT
016ea6b319
Use a side-table of consts instead of matching on the DepKind enum.
2021-01-08 17:48:02 +01:00
Camille GILLOT
d1220fdedf
Simplify DepNodeParams.
2021-01-08 17:29:49 +01:00
Tyson Nottingham
03eb75f759
rustc_query_system: avoid race condition when using edge_count
2020-12-22 14:12:57 -08:00
Tyson Nottingham
22ed75158b
rustc_query_system: add more comments for dependency graph
2020-12-22 14:12:57 -08:00
Tyson Nottingham
d6b2aaed7d
rustc_query_system: rename intern_node to intern_new_node
2020-12-22 14:12:57 -08:00
Tyson Nottingham
712fcae13a
rustc_query_system: remove inline annotation from edge_count
...
This isn't called frequently enough to justify inlining.
2020-12-22 14:12:57 -08:00
Tyson Nottingham
4f76266295
rustc_query_system: minor cleanup
...
Remove effectively unused parameter and delete out of date comment.
2020-12-22 14:12:57 -08:00
Tyson Nottingham
dd1ab840d2
rustc_query_system: use more space-efficient edges representation
...
Use single vector of edges rather than per-node vector. There is a small
hit to instruction counts (< 0.5%), but the memory savings make up for it.
2020-12-22 14:12:57 -08:00