rust/compiler/rustc_borrowck/src
bors 227abacaef Auto merge of #120003 - Mark-Simulacrum:opt-promoted, r=davidtwco
perf: Don't track specific live points for promoteds

We don't query this information out of the promoted (it's basically a single "unit" regardless of the complexity within it) and this saves on re-initializing the SparseIntervalMatrix's backing IndexVec with mostly empty rows for all of the leading regions in the function. Typical promoteds will only contain a few regions that need up be uplifted, while the parent function can have thousands.

For a simple function repeating println!("Hello world"); 50,000 times this reduces compile times from 90 to 15 seconds in debug mode. The previous implementations re-initialization led to an overall roughly n^2 runtime as each promoted initialized slots for ~n regions, now we scale closer to linearly (5000 hello worlds takes 1.1 seconds).

cc https://github.com/rust-lang/rust/issues/50994, https://github.com/rust-lang/rust/issues/86244
2024-01-20 11:21:28 +00:00
..
constraints Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
diagnostics Rollup merge of #120126 - sjwang05:issue-102269, r=compiler-errors 2024-01-19 19:27:03 +01:00
polonius compiler: Lower fn call arg spans down to MIR 2024-01-15 19:07:11 +01:00
region_infer Auto merge of #120003 - Mark-Simulacrum:opt-promoted, r=davidtwco 2024-01-20 11:21:28 +00:00
type_check perf: Don't track specific live points for promoteds 2024-01-19 20:49:51 -05:00
util
borrow_set.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
borrowck_errors.rs Rename consuming chaining methods on DiagnosticBuilder. 2024-01-10 07:40:00 +11:00
consumers.rs
dataflow.rs remove redundant imports 2023-12-10 10:56:22 +08:00
def_use.rs rename BorrowKind::Shallow to Fake 2023-11-08 22:55:28 +01:00
facts.rs
lib.rs compiler: Lower fn call arg spans down to MIR 2024-01-15 19:07:11 +01:00
location.rs Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
member_constraints.rs
nll.rs Move PointIndex to mir_dataflow. 2024-01-07 20:07:35 +00:00
path_utils.rs Remove Upvar duplication 2023-11-26 13:19:10 -05:00
place_ext.rs
places_conflict.rs rename BorrowKind::Shallow to Fake 2023-11-08 22:55:28 +01:00
prefixes.rs
renumber.rs add fixme to RegionCtxt 2023-11-13 14:13:54 +00:00
session_diagnostics.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
universal_regions.rs Simplify closure_env_ty and closure_env_param 2024-01-14 19:15:46 +00:00
used_muts.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00