T-compiler Meeting Agenda 2024-02-15
Announcements
- 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 Types Team: ITE (Impl Trait Everywhere) Triage time:2024-02-15T22:00:00+01:00
- Types Team: Rotating Solver/Formality/Polonius Deep dive time:2024-02-19T17:00:00+01:00
MCPs/FCPs
- New MCPs (take a look, see if you like them!)
- No new proposals this time.
- MCPs blocked on unresolved concerns
- “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip) (last review activity: about 29 days ago)
- concern: added-complexity-to-frontend
- “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
- “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip) (last review activity: about 29 days ago)
- Old MCPs (not seconded, take a look)
- “Introduce perma-unstable
wasm-c-abi
flag” compiler-team#703 (Zulip) (last review activity: 2 months ago) - “Support patchable-function-entry” compiler-team#704 (Zulip) (last review activity: 2 months ago)
- “Target families for executable format” compiler-team#716 (Zulip) (last review activity: about 12 days ago)
- “Promote tier 3 arm64e-apple-darwin target to tier 2” compiler-team#717 (Zulip) (last review activity: about 12 days ago)
- “Add
--emit=
to emit nothing” compiler-team#718 (Zulip) (last review activity: about 12 days ago) - “Use debug fission instead of dwarf split debuginfo for -Csplit-debuginfo=packed” compiler-team#721 (Zulip) (last review activity: about 6 days ago)
- “Introduce perma-unstable
- Pending FCP requests (check your boxes!)
- “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 - “debuginfo: Stabilize
-Z debug-macros
,-Z collapse-macro-debuginfo
and#[collapse_debuginfo]
” rust#120845
- Things in FCP (make sure you’re good with it)
- “Add a stable flag to enable/disable codegen UB checks” compiler-team#625 (Zulip)
- “Remove fake
rust-intrinsic
ABI” compiler-team#720 (Zulip) - “Overhaul
Diagnostic
andDiagnosticBuilder
" compiler-team#722 (Zulip) - “Rename
astconv::AstConv
and related items” compiler-team#723 (Zulip)
- Accepted MCPs
- “Stabilize
--json=unused-externs(-silent)
” compiler-team#674 (Zulip) - “Semantics of
-Cinstrument-coverage=all
” compiler-team#690 (Zulip) - “New Tier-3 target:
wasm32-wasi-preview2
” compiler-team#694 (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)
- “Promote tier 3
*-pc-windows-gnullvm
targets to tier 2” compiler-team#710 (Zulip) - “Unstably support MIR-only rlibs” compiler-team#713 (Zulip)
- “Promote OpenHarmony targets to tier 2” compiler-team#719 (Zulip)
- “Stabilize
- Finalized FCPs (disposition merge)
- “static mut: allow mutable reference to arbitrary types, not just slices and arrays” rust#117614
- “Check normalized call signature for WF in mir typeck” rust#118882
WG checkins
- @_T-rust-analyzer by @Lukas Wirth (previous checkin):
We now share a bit more code with the compiler thanks to @Nadrieril https://github.com/rust-lang/rust-analyzer/pull/16420, fixing some bugs and panics with our exhaustiveness checking along the way :tada: On a less happy note, rust-analyzer still lacks support for ATPITs which is on the path to stabilization. rust-analyzer currently reports a type mismatch for the snippet in the PR description, https://github.com/rust-lang/rust-analyzer/issues/15704.
Backport nominations
T-compiler beta / T-compiler stable
- :beta: [1.77] “Update jobserver-rs to 0.1.28” rust#120846
- Fixes #120515, regression when running
rustc
withmake -j2
- nominated by @Vadim Petrochenkov
- Fixes #120515, regression when running
- :beta: [1.77] “Improve wording of
static_mut_ref
” rust#121034- nominated by @oli, closes #120964 (documentation wording, IIUC)
- PR is being reviewed. Diff is non-trivial even if not code
- :beta: [1.77] “Update LLVM submodule” rust#121132
- nominated by @nikic
- Fixes various P-high LLVM related issues
- :stable: [1.76] “Update jobserver-rs to 0.1.28” rust#120846
- as above. Stable backport in case a minor release is in the air
- No beta nominations for
T-types
this time. - No stable nominations for
T-types
this time.
PRs S-waiting-on-team
- “debuginfo: Stabilize
-Z debug-macros
,-Z collapse-macro-debuginfo
and#[collapse_debuginfo]
” rust#120845I-compiler-nominated
: see end of the agenda
- Other issues in progress or waiting on other teams
Issues of Note
Short Summary
- 1 T-compiler P-critical issues
- 62 T-compiler P-high issues
- 0 P-critical, 1 P-high, 1 P-medium, 0 P-low regression-from-stable-to-beta
- 1 P-critical, 0 P-high, 2 P-medium, 2 P-low regression-from-stable-to-nightly
- 0 P-critical, 37 P-high, 100 P-medium, 16 P-low regression-from-stable-to-stable
P-critical
- “thread ‘rustc’ panicked at compiler/rustc_metadata/src/rmeta/encoder.rs:1888:17” rust#120830
- Happens on nightly
diesel
crate author proposes to revert the change rolled up in #121038 (exact PR is #119592)- Vadim suggest a different approach than reverting (comment)
- No
P-critical
issues forT-types
this time.
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
Relatively balanced results this week, with more improvements than regressions. Some of the
larger regressions are not relevant, however there was a real large regression on doc
builds, that was
caused by a correctness fix (rustdoc
was doing the wrong thing before).
Triage done by @kobzol. Revision range: 0984becf..74c3f5a1
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 2.1% | [0.2%, 12.0%] | 44 |
Regressions (secondary) | 5.2% | [0.2%, 20.1%] | 76 |
Improvements (primary) | -0.7% | [-2.4%, -0.2%] | 139 |
Improvements (secondary) | -1.3% | [-3.3%, -0.3%] | 86 |
All (primary) | -0.1% | [-2.4%, 12.0%] | 183 |
6 Regressions, 5 Improvements, 8 Mixed; 5 of them in rollups 53 artifact comparisons made in total
Regressions
pattern_analysis: Gracefully abort on type incompatibility #120313 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 1.9% | [1.8%, 2.0%] | 6 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | - | - | 0 |
- The pattern matching machinery is now receiving a lot of updates, and the
match-stress
stress test is swinging back and forth. Marked as triaged.
Rework support for async closures; allow them to return futures that borrow from the closure’s captures #120361 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.2%, 0.7%] | 11 |
Regressions (secondary) | 0.6% | [0.4%, 0.7%] | 11 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -0.2% | [-0.2%, -0.2%] | 1 |
All (primary) | 0.5% | [0.2%, 0.7%] | 11 |
- This is probably just codegen noise, the changes were reverted in followup commits. Marked as triaged.
Make traits / trait methods detected by the dead code lint #118257 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.1%, 1.8%] | 18 |
Regressions (secondary) | 9.4% | [0.2%, 16.0%] | 10 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.7% | [0.1%, 1.8%] | 18 |
- This PR implements a new lint for unused traits, so the compiler does more work. The large regression is a red herring, it is a small stress test that didn’t produce any warnings before, but it does now, which causes it to initialize the diagnostics machinery, which is a one-time cost. Marked as triaged.
Stop bailing out from compilation just because there were incoherent traits #120558 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.2%, 1.0%] | 14 |
Regressions (secondary) | 1.2% | [0.1%, 3.5%] | 23 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.4% | [0.2%, 1.0%] | 14 |
- The regression was resolved in #120835.
Rollup of 6 pull requests #120862 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.3%, 0.7%] | 7 |
Regressions (secondary) | 4.0% | [1.2%, 7.7%] | 13 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.5% | [0.3%, 0.7%] | 7 |
- Regression is expected to be partially resolved by #120942.
Assert that params with the same index have the same name #120619 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 6.0% | [1.6%, 19.0%] | 18 |
Regressions (secondary) | 12.2% | [0.8%, 19.1%] | 22 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 6.0% | [1.6%, 19.0%] | 18 |
- The
doc
regressions are unfortunately real, however this is a bugfix,rustdoc
was doing incorrect work.
Improvements
Rollup of 13 pull requests #120748 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -1.1% | [-2.3%, -0.2%] | 27 |
Improvements (secondary) | -1.7% | [-2.2%, -1.4%] | 11 |
All (primary) | -1.1% | [-2.3%, -0.2%] | 27 |
- Nice win caused by #120733.
Prevent running some code if it is already in the map #120579 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -2.3% | [-5.9%, -0.8%] | 19 |
Improvements (secondary) | -4.0% | [-6.4%, -0.6%] | 22 |
All (primary) | -2.3% | [-5.9%, -0.8%] | 19 |
- A nice win for
doc
benchmarks.
Continue to borrowck even if there were previous errors #120550 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.9% | [-1.0%, -0.8%] | 4 |
Improvements (secondary) | -0.5% | [-0.7%, -0.3%] | 17 |
All (primary) | -0.9% | [-1.0%, -0.8%] | 4 |
Harmonize AsyncFn
implementations, make async closures conditionally impl Fn*
traits #120712 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.5% | [-0.8%, -0.2%] | 5 |
Improvements (secondary) | -0.6% | [-0.7%, -0.5%] | 2 |
All (primary) | -0.5% | [-0.8%, -0.2%] | 5 |
A trait’s local impls are trivially coherent if there are no impls. #120834 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.4% | [-1.0%, -0.2%] | 10 |
Improvements (secondary) | -1.4% | [-3.5%, -0.3%] | 24 |
All (primary) | -0.4% | [-1.0%, -0.2%] | 10 |
Mixed
Rollup of 9 pull requests #120660 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.8% | [0.2%, 1.4%] | 2 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -0.2% | [-0.3%, -0.2%] | 2 |
All (primary) | 0.8% | [0.2%, 1.4%] | 2 |
- The regression was small and looks like noise, marking as triaged.
Make NonZero
constructors generic. #120521 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.4%, 1.7%] | 9 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -1.0% | [-1.0%, -1.0%] | 1 |
Improvements (secondary) | -1.3% | [-1.3%, -1.3%] | 1 |
All (primary) | 0.5% | [-1.0%, 1.7%] | 10 |
- Regression later resolved in #120809.
Rollup of 9 pull requests #120767 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.3%, 0.4%] | 2 |
Regressions (secondary) | 0.3% | [0.3%, 0.3%] | 1 |
Improvements (primary) | -0.2% | [-0.3%, -0.2%] | 13 |
Improvements (secondary) | -0.4% | [-0.8%, -0.2%] | 25 |
All (primary) | -0.2% | [-0.3%, 0.4%] | 15 |
- The improvements outweight the regressions. Marked as triaged.
Toggle assert_unsafe_precondition in codegen instead of expansion #120594 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.3%, 1.0%] | 13 |
Regressions (secondary) | 0.5% | [0.2%, 2.1%] | 8 |
Improvements (primary) | -0.6% | [-1.4%, -0.2%] | 15 |
Improvements (secondary) | -0.6% | [-1.4%, -0.2%] | 15 |
All (primary) | -0.1% | [-1.4%, 1.0%] | 28 |
- The wins and regressions are more or less balanced out.
Rollup of 8 pull requests #120843 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.2% | [0.2%, 0.2%] | 1 |
Regressions (secondary) | 0.6% | [0.2%, 1.0%] | 11 |
Improvements (primary) | -0.5% | [-1.0%, -0.2%] | 41 |
Improvements (secondary) | -0.8% | [-2.4%, -0.2%] | 17 |
All (primary) | -0.5% | [-1.0%, 0.2%] | 42 |
- More wins than losses. Marked as triaged.
Enable MIR JumpThreading by default #117206 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 1.8% | [0.4%, 7.1%] | 10 |
Regressions (secondary) | 1.0% | [0.4%, 3.3%] | 18 |
Improvements (primary) | -0.5% | [-1.6%, -0.2%] | 130 |
Improvements (secondary) | -0.8% | [-2.5%, -0.3%] | 74 |
All (primary) | -0.4% | [-1.6%, 7.1%] | 140 |
- Wins outweight the losses here, and this PR should also hopefully improve runtime performance slightly,
which seems to be confirmed by our runtime
hashmap
benchmarks. Marked as triaged.
Fold pointer operations in GVN #120405 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.9% | [0.7%, 1.1%] | 2 |
Regressions (secondary) | 2.7% | [2.7%, 2.7%] | 1 |
Improvements (primary) | -0.5% | [-0.8%, -0.3%] | 4 |
Improvements (secondary) | -1.8% | [-1.8%, -1.8%] | 1 |
All (primary) | 0.0% | [-0.8%, 1.1%] | 6 |
- There are a few regressions, but nothing too large. This change should eventually help the compiler optimize Rust code better. Marked as triaged.
Lowering unnamed fields and anonymous adt #115367 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 6.1% | [0.3%, 20.7%] | 9 |
Improvements (primary) | -1.1% | [-1.1%, -1.1%] | 1 |
Improvements (secondary) | -0.3% | [-0.3%, -0.3%] | 1 |
All (primary) | -1.1% | [-1.1%, -1.1%] | 1 |
- A large regression on a stress test. Not marking as triaged yet.
Nominated Issues
- “Limit
-C strip
on MSVC” rust#115120- Nominated by @davidtwco
- Discussion about
-C
flags starts here
- “Feature gates for renamed features hard error, breaking “nightly-detecting” crates” rust#120804
- Nominated by @Manish Goregaokar
- Seems that renaming nightly features can break some crates (also fundamental ones, like
proc-macro2
). The proposal is to add some machinery inrustc
to prevent this to happen - Other comments point out that this is a “bad” behaviour that crates should avoid (comment and following)
- Also interesting this comment from @RalfJ in a crate affected
- “debuginfo: Stabilize
-Z debug-macros
,-Z collapse-macro-debuginfo
and#[collapse_debuginfo]
” rust#120845- Nominated by @Vadim Petrochenkov (see Stabilization report), opened FCP
- No I-compiler-nominated RFCs this time.
Oldest PRs waiting for review
- None this week
Next week’s WG checkins
- @_WG-diagnostics by @Esteban Küber and @oli
- @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081
Next meetings' agenda draft: hackmd link