1
Fork 0
rust/compiler
bors 542ed2bf72 Auto merge of #108417 - Zoxc:dep-graph-branch, r=cjgillot
Move dep graph methods to DepGraphData to avoid branches and `unwrap`s

This moves methods from `DepGraph` to `DepGraphData` which makes the code a bit cleaner since the dep graph is unconditionally available. It also changes `try_execute_query` to only branch on dep graph availability once, removing unnecessary branches and `unwrap`s.

This is based on https://github.com/rust-lang/rust/pull/108134 and https://github.com/rust-lang/rust/pull/108167.

Performance impact of just the last commit:
<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.7354s</td><td align="right">1.7242s</td><td align="right"> -0.64%</td></tr><tr><td>🟣 <b>clap</b>:check:initial</td><td align="right">2.0813s</td><td align="right">2.0687s</td><td align="right"> -0.61%</td></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4554s</td><td align="right">0.4550s</td><td align="right"> -0.09%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2528s</td><td align="right">0.2521s</td><td align="right"> -0.27%</td></tr><tr><td>🟣 <b>hyper</b>:check:initial</td><td align="right">0.3222s</td><td align="right">0.3214s</td><td align="right"> -0.25%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1339s</td><td align="right">0.1333s</td><td align="right"> -0.38%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9484s</td><td align="right">0.9455s</td><td align="right"> -0.30%</td></tr><tr><td>🟣 <b>regex</b>:check:initial</td><td align="right">1.1805s</td><td align="right">1.1727s</td><td align="right"> -0.66%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3305s</td><td align="right">0.3307s</td><td align="right"> 0.08%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.5453s</td><td align="right">1.5374s</td><td align="right"> -0.51%</td></tr><tr><td>🟣 <b>syn</b>:check:initial</td><td align="right">1.9230s</td><td align="right">1.9206s</td><td align="right"> -0.12%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.6340s</td><td align="right">0.6333s</td><td align="right"> -0.11%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">5.8623s</td><td align="right">5.8536s</td><td align="right"> -0.15%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:initial</td><td align="right">7.2873s</td><td align="right">7.2786s</td><td align="right"> -0.12%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.8378s</td><td align="right">1.8478s</td><td align="right"> 0.54%</td></tr><tr><td>Total</td><td align="right">26.5300s</td><td align="right">26.4750s</td><td align="right"> -0.21%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9976s</td><td align="right"> -0.24%</td></tr></table>

r? `@cjgillot`
2023-03-11 21:34:23 +00:00
..
rustc Add a new rustc_driver dylib to rexport rustc_driver_impl 2023-02-02 07:34:41 +01:00
rustc_abi Unify validity checks into a single query 2023-02-23 18:42:36 +00:00
rustc_apfloat
rustc_arena
rustc_ast Rename MapInPlace as FlatMapInPlace. 2023-03-08 15:53:56 +11:00
rustc_ast_lowering Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco 2023-03-11 15:43:15 +01:00
rustc_ast_passes Remove allow(potential_query_instability) from ast_passes 2023-03-04 12:39:54 +00:00
rustc_ast_pretty Force parentheses around match expression in binary expression 2023-03-02 21:58:49 +01:00
rustc_attr errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
rustc_baked_icu_data update ICU4X to 1.1.0 2023-02-04 22:28:59 +01:00
rustc_borrowck Auto merge of #108977 - matthiaskrgr:rollup-1bnl1hu, r=matthiaskrgr 2023-03-10 15:39:25 +00:00
rustc_builtin_macros Rollup merge of #106844 - Ezrashaw:concat-negative-int-lit, r=dtolnay 2023-03-11 15:43:12 +01:00
rustc_codegen_cranelift Auto merge of #109001 - matthiaskrgr:rollup-a3agnwp, r=matthiaskrgr 2023-03-11 07:28:44 +00:00
rustc_codegen_gcc replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
rustc_codegen_llvm Rollup merge of #108822 - nikic:legacy-pm-removal-2, r=cuviper 2023-03-07 19:57:46 +01:00
rustc_codegen_ssa Rollup merge of #108739 - 823984418:patch-1, r=cjgillot 2023-03-11 15:43:15 +01:00
rustc_const_eval Auto merge of #108977 - matthiaskrgr:rollup-1bnl1hu, r=matthiaskrgr 2023-03-10 15:39:25 +00:00
rustc_data_structures Rollup merge of #108887 - nnethercote:rename-MapInPlace, r=lqd 2023-03-08 21:24:53 +01:00
rustc_driver Remove unneeded extern crate 2023-02-02 07:47:39 +01:00
rustc_driver_impl Querify early_lint_checks. 2023-03-06 11:26:29 +00:00
rustc_error_codes refactor: statically guarantee that current error codes are documented 2023-02-26 20:12:36 +13:00
rustc_error_messages Handle selecting the default locale better 2023-02-23 01:14:10 +01:00
rustc_errors Properly colorize multi-part suggestions in the same line 2023-03-04 00:29:52 +00:00
rustc_expand Auto merge of #109019 - matthiaskrgr:rollup-ihjntil, r=matthiaskrgr 2023-03-11 18:15:53 +00:00
rustc_feature Stabilize movbe target feature 2023-03-02 17:14:47 -05:00
rustc_fs_util
rustc_graphviz
rustc_hir Only look for param in generics if it actually comes from generics 2023-02-28 06:27:56 +00:00
rustc_hir_analysis Rollup merge of #108930 - Ezrashaw:better-error-for-manual-fn-impl, r=petrochenkov 2023-03-10 19:59:19 +01:00
rustc_hir_pretty Add ErrorGuaranteed to HIR ExprKind::Err 2023-02-25 19:46:36 +00:00
rustc_hir_typeck Rollup merge of #108950 - cjgillot:inherit-less, r=compiler-errors 2023-03-11 12:55:44 +01:00
rustc_incremental Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_index Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_infer Rollup merge of #108071 - compiler-errors:new-solver-caching, r=lcnr 2023-03-11 15:43:13 +01:00
rustc_interface Auto merge of #109019 - matthiaskrgr:rollup-ihjntil, r=matthiaskrgr 2023-03-11 18:15:53 +00:00
rustc_lexer fix(lexer): not skipped whitespace warning for '\x0c' 2023-03-09 22:44:58 +08:00
rustc_lint Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco 2023-03-11 15:43:15 +01:00
rustc_lint_defs Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco 2023-03-11 15:43:15 +01:00
rustc_llvm Remove an extraneous include 2023-03-07 22:46:39 -08:00
rustc_log Rollup merge of #107895 - matthiaskrgr:cl, r=compiler-errors 2023-02-11 17:18:44 +01:00
rustc_macros Allow using bool for optional diagnostics 2023-02-27 12:54:11 +00:00
rustc_metadata Auto merge of #101550 - CraftSpider:link-dead-windows, r=wesleywiser 2023-03-05 02:00:58 +00:00
rustc_middle Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco 2023-03-11 15:43:15 +01:00
rustc_mir_build Rollup merge of #108902 - lcnr:do-while-sus, r=davidtwco,Nilstrieb 2023-03-10 21:15:46 +01:00
rustc_mir_dataflow Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
rustc_mir_transform Rollup merge of #108902 - lcnr:do-while-sus, r=davidtwco,Nilstrieb 2023-03-10 21:15:46 +01:00
rustc_monomorphize Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgr 2023-03-09 08:21:17 +00:00
rustc_parse Rollup merge of #108900 - bvanjoi:issue-108275, r=petrochenkov 2023-03-10 19:59:19 +01:00
rustc_parse_format Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_passes Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholk 2023-03-08 06:07:11 +00:00
rustc_plugin_impl errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
rustc_privacy rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
rustc_query_impl Auto merge of #108167 - Zoxc:query-config-instance-slim, r=cjgillot 2023-03-07 18:55:36 +00:00
rustc_query_system Remove dep_node_index_of_opt and dep_node_index_of 2023-03-09 08:00:54 +01:00
rustc_resolve Auto merge of #109019 - matthiaskrgr:rollup-ihjntil, r=matthiaskrgr 2023-03-11 18:15:53 +00:00
rustc_serialize Emit the enum discriminant separately for the Encodable macro 2023-02-25 01:04:56 +01:00
rustc_session Honor current target when checking conditional compilation values 2023-03-09 21:55:00 +01:00
rustc_smir Change item collection to be on demand 2023-03-07 12:47:25 -08:00
rustc_span Rollup merge of #104363 - WaffleLapkin:bonk_box_new, r=Nilstrieb 2023-03-11 15:43:11 +01:00
rustc_symbol_mangling Rename many interner functions. 2023-02-24 07:32:24 +11:00
rustc_target Use FxIndexSet instead of FxHashSet for asm_target_features query. 2023-03-01 10:19:26 +01:00
rustc_trait_selection Rollup merge of #108071 - compiler-errors:new-solver-caching, r=lcnr 2023-03-11 15:43:13 +01:00
rustc_traits Add mk_canonical_var_infos_from_iter. 2023-02-24 07:33:02 +11:00
rustc_transmute rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
rustc_ty_utils Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholk 2023-03-08 06:07:11 +00:00
rustc_type_ir make first component of dyn* use pointer layout+type, and adjust DynStar comment 2023-02-18 19:24:55 +00:00