1
Fork 0
rust/compiler/rustc_metadata/src
bors 6f65ef5717 Auto merge of #113562 - saethlin:larger-incr-comp-offset, r=nnethercote
Use u64 for incr comp allocation offsets

Fixes https://github.com/rust-lang/rust/issues/76037
Fixes https://github.com/rust-lang/rust/issues/95780
Fixes https://github.com/rust-lang/rust/issues/111613

These issues are all reporting ICEs caused by using `u32` to store offsets to allocations in the incremental compilation cache. This PR aims to lift that limitation by changing the offset type in question to `u64`.

There are two perf runs in this PR. The first reports a regression, and the second does not. The changes are the same in both. I rebased the PR then did the second perf run because I noticed that the primary regression in it was very commonly seen in spurious regression reports.

I do not know what the perf run will report when this is merged. I would not be surprised to see regression or neutral, but the cachegrind diffs for the regression point at `try_mark_previous_green` which is a common source of inexplicable regressions and I don't think should be perturbed by this PR.

I'm not opposed to adding a regression test such as
```rust
fn main() {
    println!("{}", [37; 1 << 30].len());
}
```
But that program takes 1 minute to compile and consumes 4.6 GB of memory then writes that much to disk. Is that a concerning amount of resource use for a test?

r? `@nnethercote`
2023-07-17 04:45:10 +00:00
..
rmeta Auto merge of #113562 - saethlin:larger-incr-comp-offset, r=nnethercote 2023-07-17 04:45:10 +00:00
creader.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
dependency_format.rs Add unstable feature flags 2023-04-19 18:55:11 +00:00
errors.rs Revert "Suggest x build library for a custom toolchain that fails to load core" 2023-07-03 12:48:52 +00:00
foreign_modules.rs Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
fs.rs fix 2023-06-06 17:54:34 -04:00
lib.rs s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList 2023-06-14 09:28:54 +02:00
locator.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
native_libs.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00