T-compiler Meeting Agenda 2024-01-25
Announcements
- Steering meeting: Tracking Issue Review time:2024-01-25T16:00:00+01:00
- Reminder: if you see a PR/issue that seems like there might be legal implications due to copyright/IP/etc, please let us know (or at least message @davidtwco or @Wesley Wiser so we can pass it along).
Other WG meetings
- Types Team: ITE (Impl Trait Everywhere) Triage time:2024-01-24T22:00:00+01:00
- Stable MIR Weekly Meeting time:2024-01-25T16:00:00+01:00
MCPs/FCPs
- New MCPs (take a look, see if you like them!)
- No new proposals this time.
- Old MCPs (stale MCP might be closed as per MCP procedure)
- None at this time
- Old MCPs (not seconded, take a look)
- “Semantics of
-Cinstrument-coverage=all
” compiler-team#690 (Zulip) (last review activity: about 43 days ago) - “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip) (last review activity: about 8 days ago)
- concern: added-complexity-to-frontend
- “Introduce perma-unstable
wasm-c-abi
flag” compiler-team#703 (Zulip) (last review activity: about 41 days ago) - “Support patchable-function-entry” compiler-team#704 (Zulip) (last review activity: about 41 days ago)
- “Semantics of
- Pending FCP requests (check your boxes!)
- “Add a new
--build-id
flag to rustc” compiler-team#635 (Zulip)- concern: option-name
- concern: other-existing-options
- “Retire the mailing list and make all decisions on zulip” compiler-team#649 (Zulip)
- concern: automatic-sync
- concern: single-point-of-failure-via-stream-archival
- “Stabilize
--json=unused-externs(-silent)
” compiler-team#674 (Zulip) - “Support overriding
warnings
level for a specific lint via command line” rust#113307 - “Update Windows platform support” rust#115141
- “Stabilize Wasm target features that are in phase 4 and 5” rust#117457
- “Stabilize
--env-set
option” rust#119926
- “Add a new
- Things in FCP (make sure you’re good with it)
- “Add a stable flag to enable/disable codegen UB checks” compiler-team#625 (Zulip)
- “Stabilize
--json=unused-externs(-silent)
” compiler-team#674 (Zulip) - “New Tier-3 target:
wasm32-wasi-preview2
” compiler-team#694 (Zulip) - “Smooth the renaming transition of
wasm32-wasi
” compiler-team#695 (Zulip) - “Provide option to shorten symbol names by replacing them with a digest” compiler-team#705 (Zulip)
- “uplift some -Zverbose calls and rename to -Zverbose-internals” compiler-team#706 (Zulip)
- “Add -Z direct-access-external-data” compiler-team#707 (Zulip)
- “Promote tier 3
*-pc-windows-gnullvm
targets to tier 2” compiler-team#710 (Zulip) - “Unstably support MIR-only rlibs” compiler-team#713 (Zulip)
- Accepted MCPs
- “Start using clippy on rustc” compiler-team#709 (Zulip)
- Finalized FCPs (disposition merge)
- “error on incorrect implied bounds in wfcheck except for Bevy dependents” rust#118553
- “Undeprecate lint
unstable_features
and make use of it in the compiler” rust#118639 - “Warn on references casting to bigger memory layout” rust#118983
- “const-eval interning: get rid of type-driven traversal” rust#119044
- “Deny braced macro invocations in let-else” rust#119062
WG checkins
-
@_WG-async-foundations by @nikomatsakis and @tmandry
Checkin text
-
@_WG-diagnostics by @Esteban Küber and @oli
- new activity on annotate-snippets (for now just for use in cargo, but moving towards using it in rustc, too)
- removing the reliance of the compiler on the global error counter by instead tainting or bubbling up errors as appropriate
Backport nominations
T-compiler beta / T-compiler stable
- No beta nominations for
T-compiler
this time. - No stable nominations for
T-compiler
this time.
- No beta nominations for
T-types
this time. - No stable nominations for
T-types
this time.
Note: 2 beta backport nominations for T-libs
PRs S-waiting-on-team
- “Tracking issue for dyn upcasting coercion” rust#65991
- @pnkfelix (proponent of the FCP) do you know what is the actual status of this tracking issue?
- Other issues in progress or waiting on other teams
Issues of Note
Short Summary
- 0 T-compiler P-critical issues
- 59 T-compiler P-high issues
- 1 P-critical, 0 P-high, 2 P-medium, 0 P-low regression-from-stable-to-beta
- 0 P-critical, 0 P-high, 2 P-medium, 2 P-low regression-from-stable-to-nightly
- 0 P-critical, 38 P-high, 100 P-medium, 17 P-low regression-from-stable-to-stable
P-critical
- No
P-critical
issues forT-compiler
this time.
- “Pointer casts allow switching trait parameters for trait objects, which doesn’t interact soundly with trait upcasting” rust#120222
I-types-nominated
- T-types approved the revert of #118133 with rust#120233 (comment)
- Revert also backported
P-high regressions
- No
P-high
beta regressions this time.
Unassigned P-high nightly regressions
- No unassigned
P-high
nightly regressions this time.
Performance logs
This week saw a bunch of regressions caused by correctness fixes and in general doing more work in the compiler. These were offset by many improvements (especially around hashing in the compiler) that improved performance by ~2% across a large number of benchmarks. Don’t get too excited about the large 45+% wins though, these were only for tiny benchmarks like helloworld. They were caused by a change in Cargo which introduces stripping of debug symbols from Rust release binaries by default, and in turn also improves compilation time for small crates.
Triage done by @kobzol. Revision range: f9c2421a..d6b151fc
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.2%, 1.5%] | 11 |
Regressions (secondary) | 2.2% | [0.2%, 9.9%] | 26 |
Improvements (primary) | -3.2% | [-47.5%, -0.2%] | 191 |
Improvements (secondary) | -7.9% | [-46.5%, -0.1%] | 123 |
All (primary) | -3.0% | [-47.5%, 1.5%] | 202 |
4 Regressions, 4 Improvements, 9 Mixed; 4 of them in rollups 48 artifact comparisons made in total
Regressions
fix fn/const items implied bounds and wf check (rebase) #120019 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.3% | [0.2%, 0.5%] | 26 |
Regressions (secondary) | 1.3% | [0.3%, 1.6%] | 9 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.3% | [0.2%, 0.5%] | 26 |
- This was a correctness fix that had an expected performance hit.
Rollup of 8 pull requests #120187 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.3%, 1.0%] | 8 |
Regressions (secondary) | 0.9% | [0.3%, 1.8%] | 16 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.5% | [0.3%, 1.0%] | 8 |
- This was a mixture of several PRs that had a perf. effect.
- #119461 and #118811
slightly regressed the
deep-vector
benchmark, which was however quite noisy recently, so it was probably just a blip. - #116090 caused a real regression on
doc
benchmarks, which was caused simply by adding a bunch of new methods to the standard library.
Rollup of 8 pull requests #120196 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 1.3% | [1.3%, 1.3%] | 1 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 1.3% | [1.3%, 1.3%] | 1 |
- Caused by #120145, which was a correctness fix, so marked as triaged.
Rollup of 10 pull requests #120242 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 3.1% | [3.1%, 3.1%] | 1 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | - | - | 0 |
- Caused by #120137, which added more validation to the compiler, and the perf. hit was deemed acceptable, so marked as triaged.
Improvements
Cache local DefId-keyed queries without hashing #119977 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.7%, 0.7%] | 1 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -1.2% | [-8.2%, -0.2%] | 161 |
Improvements (secondary) | -1.5% | [-3.7%, -0.3%] | 64 |
All (primary) | -1.2% | [-8.2%, 0.7%] | 162 |
- Incredible wins across many benchmarks, caused by improving hashing in the compiler.
- The wall-time results of this PR were even more impressive, resulting in a ~4% mean improvement across more than a hundred benchmark configurations!
Get rid of the hir_owner query. #120006 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 0.3% | [0.2%, 0.4%] | 3 |
Improvements (primary) | -1.8% | [-5.5%, -0.3%] | 129 |
Improvements (secondary) | -2.1% | [-4.4%, -0.4%] | 46 |
All (primary) | -1.8% | [-5.5%, -0.3%] | 129 |
- Again, great wins across a lot of benchmarks.
Use UnhashMap for a few more maps #120076 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.3%, -0.2%] | 13 |
Improvements (secondary) | -0.3% | [-0.4%, -0.2%] | 4 |
All (primary) | -0.3% | [-0.3%, -0.2%] | 13 |
- Continuation of hashing improvements.
Always use RevealAll for const eval queries #119821 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.3%, -0.3%] | 3 |
Improvements (secondary) | -1.4% | [-1.8%, -1.2%] | 7 |
All (primary) | -0.3% | [-0.3%, -0.3%] | 3 |
- This PR improved mainly the performance of const evaluation in the compiler.
Mixed
Sandwich MIR optimizations between DSE. #119672 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.2%, 1.4%] | 14 |
Regressions (secondary) | 0.5% | [0.2%, 2.7%] | 14 |
Improvements (primary) | -1.0% | [-2.2%, -0.2%] | 31 |
Improvements (secondary) | -0.9% | [-2.2%, -0.2%] | 10 |
All (primary) | -0.4% | [-2.2%, 1.4%] | 45 |
- Several nice wins on larger benchmarks, overall the wins outweighed the losses.
large_assignments: Lint on specific large args passed to functions #116520 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.2%, 0.8%] | 45 |
Regressions (secondary) | 0.6% | [0.2%, 2.1%] | 8 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -6.0% | [-6.0%, -6.0%] | 1 |
All (primary) | 0.4% | [0.2%, 0.8%] | 45 |
- This new lint introduced more tracking of spans in the compiler, which expectedly slightly regressed compile times. It is expected that the new spans will be used by future lints/errors to provide better diagnostics.
Update cargo #120036 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.4%, 0.5%] | 2 |
Regressions (secondary) | 1.4% | [1.4%, 1.4%] | 1 |
Improvements (primary) | -16.8% | [-47.6%, -0.4%] | 13 |
Improvements (secondary) | -20.5% | [-46.9%, -2.2%] | 37 |
All (primary) | -14.5% | [-47.6%, 0.5%] | 15 |
- A few tiny regressions, but there’s not much to be done about these since this was a Cargo update.
- The large instruction count improvements came from https://github.com/rust-lang/cargo/pull/13257,
which introduced stripping of
--release
binaries by default. This coincidentally also reduces linking time on Linux quite a lot for tiny programs, which caused these improvements onhelloworld
-like crates.
error on incorrect implied bounds in wfcheck except for Bevy dependents #118553 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.2%, 1.6%] | 30 |
Regressions (secondary) | 0.4% | [0.2%, 0.6%] | 13 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -1.0% | [-1.2%, -0.8%] | 6 |
All (primary) | 0.7% | [0.2%, 1.6%] | 30 |
- Regressions have outweighted the improvements here, however, this was a correctness fix, so we will have to take the hit. A part of the regressions reverted wins from #120123.
Rollup of 9 pull requests #120112 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 3.2% | [0.3%, 4.1%] | 7 |
Improvements (primary) | -0.7% | [-0.7%, -0.7%] | 1 |
Improvements (secondary) | - | - | 0 |
All (primary) | -0.7% | [-0.7%, -0.7%] | 1 |
- This was caused by #120037, which seems to have just undone a previous perf. win on the same benchmarks caused by code being reshuffled around.
use implied bounds compat mode in MIR borrowck #120123 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 0.9% | [0.9%, 1.0%] | 4 |
Improvements (primary) | -0.7% | [-0.9%, -0.6%] | 6 |
Improvements (secondary) | - | - | 0 |
All (primary) | -0.7% | [-0.9%, -0.6%] | 6 |
- This PR had more wins than losses, however its effects were later mostly reverted in #118553.
LLVM 18 x86 data layout update #116672 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.7%, 0.7%] | 1 |
Regressions (secondary) | 1.0% | [0.3%, 3.3%] | 6 |
Improvements (primary) | -0.4% | [-0.6%, -0.3%] | 8 |
Improvements (secondary) | -0.6% | [-1.1%, -0.4%] | 11 |
All (primary) | -0.3% | [-0.6%, 0.7%] | 9 |
- The wins have outweighted the losses.
- This change is required to update to LLVM 18.
- It introduced a few Max-RSS regressions, which were later fixed in #120080.
Rollup of 6 pull requests #120170 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.6% | [0.6%, 0.6%] | 1 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.9% | [-1.4%, -0.5%] | 2 |
Improvements (secondary) | - | - | 0 |
All (primary) | -0.4% | [-1.4%, 0.6%] | 3 |
- Tiny regression on a single benchmark, marked as triaged.
Pack u128 in the compiler to mitigate new alignment #120080 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.3% | [0.2%, 0.5%] | 12 |
Regressions (secondary) | 1.2% | [0.4%, 2.1%] | 2 |
Improvements (primary) | -0.7% | [-0.7%, -0.7%] | 1 |
Improvements (secondary) | -0.6% | [-0.7%, -0.3%] | 5 |
All (primary) | 0.3% | [-0.7%, 0.5%] | 13 |
- This PR mitigates the Max-RSS hits caused by #116672, at the cost of a few small instruction count regressions.
Nominated Issues
- No I-compiler-nominated issues this time.
- No I-compiler-nominated RFCs this time.
Oldest PRs waiting for review
- None this week
Next week’s WG checkins
- @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081
- Impl Trait initiative by @oli
Next meetings' agenda draft: hackmd link