T-compiler Meeting Agenda 2024-06-20
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).
- Tomorrow time:2024-06-21T16:00:00+02:00 Bonanza backlog meeting (see comment)
Other WG meetings
- Types Team: ITE (Impl Trait Everywhere) Triage time:2024-06-20T22: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)
- “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip) (last review activity: 5 months ago)
- concern: added-complexity-to-frontend
- “Target families for executable format” compiler-team#716 (Zulip) (last review activity: 4 months ago)
- “Promote riscv64gc-unknown-linux-musl to tier 2” compiler-team#728 (Zulip) (last review activity: 3 months ago)
- “Partial compilation using MIR-only rlibs” compiler-team#738 (Zulip) (last review activity: 2 months ago)
- “Add Hotpatch flag” compiler-team#745 (Zulip) (last review activity: about 34 days ago)
- “Enable
clang-formatforrustc” compiler-team#756 (Zulip) (last review activity: about 5 days ago) - “Promote wasm32-wasip2 to a Tier 2 target” compiler-team#760 (Zulip) (last review activity: about 0 days ago)
- “Promote Mac Catalyst targets to Tier 2” compiler-team#761 (Zulip) (last review activity: about 2 days ago)
- Pending FCP requests (check your boxes!)
- merge: sanitizers: stabilize core sanitizers (i.e., AddressSanitizer, LeakSanitizer, MemorySanitizer, ThreadSanitizer) (rust#123617)
- @|119009 @|124288 @|125250 @|119031 @|124287 @|426609
- Stabilization report at comment
- no pending concerns
- merge: Remove the
missing_copy_implementationslint. (rust#126293)- @|119009 @|116083 @|125250 @|426609 @|123856 @|116118
- no pending concerns
- merge: sanitizers: stabilize core sanitizers (i.e., AddressSanitizer, LeakSanitizer, MemorySanitizer, ThreadSanitizer) (rust#123617)
- Things in FCP (make sure you’re good with it)
- “Contracts: Experimental attributes and language intrinsics” compiler-team#759 (Zulip)
- “allow overwriting the output of
rustc --version” rust#124339 - “Remove the
box_pointerslint.” rust#126018
- Accepted MCPs
- “Fully rustfmt
usedeclarations” compiler-team#750 (Zulip) - “Remove
src/tools/rust-demangler” compiler-team#754 (Zulip) - “Extract rustc stable hasher into it’s own crate” compiler-team#755 (Zulip)
- “Fully rustfmt
- MCPs blocked on unresolved concerns
- merge: Add
--print host-tripleto print host target triple (rust#125579)- @|119009 @|125250 @|426609 @|232957
- concerns: triple vs tuple (by lcnr)
- merge: Add a new
--build-idflag to rustc (compiler-team#635)- @|125250 @|116107 @|125294 @|123856
- concerns: other-existing-options (by petrochenkov) option-name (by wesleywiser)
- “Retire the mailing list and make all decisions on zulip” compiler-team#649 (Zulip)
- concern: automatic-sync
- merge: Stabilize
--env-setoption (rust#119926)- @|119009 @|124288 @|123586 @|125250 @|119031 @|124287 @_|116118
- concerns: other-rustc-vars (by petrochenkov)
- merge: Add
- Finalized FCPs (disposition merge)
- “Collect relevant item bounds from trait clauses for nested rigid projections” rust#120752
- Other teams finalized FCPs
- “Collect relevant item bounds from trait clauses for nested rigid projections” rust#120752
WG checkins
None
Backport nominations
T-compiler beta / T-compiler stable
- :beta: “Only compute
specializesquery if (min)specialization is enabled in the crate of the specializing impl” rust#126139- Authored by compiler-errors
- Fixes #125197
- Mentioned last week: missed the beta backport, are we going to stable backport?
- :beta: “Add pub struct with allow(dead_code) into worklist” rust#126315
- Authored by mu001999
- Fixes #126289, A P-medium lint regression
- :stable: “defrost
RUST_MIN_STACK=ice rustc hello.rs” rust#125302- Authored by workingjubilee
- Fixes #126431, a panic when setting the env var
RUST_MIN_STACKincorrectly - author suggests stable backport, if a dot release is planned
- :stable: “Closures are recursively reachable” rust#125996
- Authored by tmiasko
- Fixes #126012, a P-medium missing MIR optimization, reported by tmiasko (seems to not have received other reports in the wild)
- This fix lost the previous beta backport train so nominated for stable (if a point release is planned)
- No beta nominations for
T-typesthis time. - No stable nominations for
T-typesthis time.
PRs S-waiting-on-team
Issues of Note
Short Summary
- 0 T-compiler P-critical issues
- 67 T-compiler P-high issues
- 0 P-critical, 1 P-high, 2 P-medium, 1 P-low regression-from-stable-to-beta
- 0 P-critical, 1 P-high, 5 P-medium, 2 P-low regression-from-stable-to-nightly
- 0 P-critical, 36 P-high, 100 P-medium, 17 P-low regression-from-stable-to-stable
P-critical
- No
P-criticalissues forT-compilerthis time.
- No
P-criticalissues forT-typesthis time.
P-high regressions
- None new
Unassigned P-high nightly regressions
- None new
Performance logs
Regressions outnumbered the improvements this week, but most of the regressions were deemed worth it for one reason or another. Overall, compiler performance didn’t end up changing very much.
Triage done by @rylev. Revision range: b5b13568..c2932aaf
Summary:
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.4% | [0.2%, 1.0%] | 63 |
| Regressions (secondary) | 0.7% | [0.2%, 2.4%] | 70 |
| Improvements (primary) | -0.6% | [-1.2%, -0.2%] | 8 |
| Improvements (secondary) | -1.1% | [-5.2%, -0.2%] | 7 |
| All (primary) | 0.3% | [-1.2%, 1.0%] | 71 |
5 Regressions, 2 Improvements, 7 Mixed; 2 of them in rollups 58 artifact comparisons made in total
Regressions
Print token::Interpolated with token stream pretty printing. #125174 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.3% | [0.2%, 0.4%] | 9 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | 0.3% | [0.2%, 0.4%] | 9 |
- No discussion of the perf run done before merging, so I asked the author/reviewer for their thoughts.
- It seems like most libc benchmarks were negatively impacted while no other benchmarks were. I’m not quite sure why that would be.
Add TyCtxt::is_lang_item, use it in the compiler #126491 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.3% | [0.2%, 0.4%] | 10 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | 0.3% | [0.2%, 0.4%] | 10 |
- The change was deemed worth it despite the perf regression.
Indicate in non_local_defs lint that the macro needs to change #125722 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.2% | [0.2%, 0.2%] | 6 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | 0.2% | [0.2%, 0.2%] | 6 |
- Only the diesel benchmark is affected, which is somewhat expected as it triggers the lint many many times (over 150 times).
Rollup of 6 pull requests #126605 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.3% | [0.3%, 0.4%] | 6 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | 0.3% | [0.3%, 0.4%] | 6 |
- The benchmarks impacted seem to now swing wildly back and forth with every run so this isn’t a perf regression per say.
Migrate inaccessible-temp-dir, output-with-hyphens and issue-10971-temps-dir run-make tests to rmake #126279 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.3% | [0.3%, 0.3%] | 6 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | 0.3% | [0.3%, 0.3%] | 6 |
- This has to be noise, this PR only modified tests.
Improvements
Migrate link-arg, link-dedup and issue-26092 run-make tests to rmake format #125500 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | - | - | 0 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | -0.4% | [-0.4%, -0.3%] | 6 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | -0.4% | [-0.4%, -0.3%] | 6 |
Migrate extern-flag-fun, incremental-debugger-visualiser and incremental-session-fail run-make tests to rmake.rs #126490 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | - | - | 0 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | -0.3% | [-0.4%, -0.3%] | 6 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | -0.3% | [-0.4%, -0.3%] | 6 |
Mixed
Add SingleUseConsts mir-opt pass #125910 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.4% | [0.3%, 0.4%] | 2 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | -0.3% | [-0.4%, -0.2%] | 4 |
| Improvements (secondary) | -2.3% | [-2.9%, -1.7%] | 2 |
| All (primary) | -0.1% | [-0.4%, 0.4%] | 6 |
- Wash on instruction counts, but nice binary size wins. The cycles improvements on tt-muncher is noise returning back to normal.
Make ObligationEmittingRelations emit Goal rather than Obligation #126130 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | - | - | 0 |
| Regressions (secondary) | 0.4% | [0.1%, 0.6%] | 14 |
| Improvements (primary) | -0.2% | [-0.2%, -0.2%] | 1 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | -0.2% | [-0.2%, -0.2%] | 1 |
- I’m asssuming the perf regression was deemed acceptable since these only occurred in stress tests?
Tait must be constrained if in sig #113169 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.7% | [0.7%, 0.7%] | 1 |
| Regressions (secondary) | - | - | 0 |
| Improvements (primary) | -0.3% | [-0.4%, -0.3%] | 2 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | -0.0% | [-0.4%, 0.7%] | 3 |
- Probably noise + we need the fix
Extend SCC construction to enable extra functionality #125069 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.2% | [0.2%, 0.3%] | 6 |
| Regressions (secondary) | 0.5% | [0.1%, 1.0%] | 10 |
| Improvements (primary) | - | - | 0 |
| Improvements (secondary) | -0.3% | [-0.3%, -0.3%] | 2 |
| All (primary) | 0.2% | [0.2%, 0.3%] | 6 |
- The perf regressions were brought down since the first perf run, but there’s still instruction count regressions in primary benchmarks here (albeit not large ones). I asked the author/reviewer for thoughts.
Remove superfluous UbChecks from SliceIndex methods #126299 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.4% | [0.2%, 0.6%] | 4 |
| Regressions (secondary) | 0.8% | [0.5%, 1.3%] | 5 |
| Improvements (primary) | -0.4% | [-0.6%, -0.2%] | 3 |
| Improvements (secondary) | -0.6% | [-0.8%, -0.4%] | 7 |
| All (primary) | 0.1% | [-0.6%, 0.6%] | 7 |
- Perf is largely a wash and was expected to have far reach consequences since it changes how slices are codegened.
rustc_span: Optimize more hygiene operations using Span::map_ctxt #126543 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | 0.2% | [0.2%, 0.2%] | 1 |
| Regressions (secondary) | 0.3% | [0.2%, 0.4%] | 3 |
| Improvements (primary) | -1.1% | [-1.4%, -0.3%] | 4 |
| Improvements (secondary) | -0.3% | [-0.3%, -0.2%] | 3 |
| All (primary) | -0.8% | [-1.4%, 0.2%] | 5 |
- Improvements outweigh the regressions which all seemed to be reversed sometime soon after this landed.
Rollup of 3 pull requests #126581 (Comparison Link)
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions (primary) | - | - | 0 |
| Regressions (secondary) | 1.3% | [1.3%, 1.3%] | 1 |
| Improvements (primary) | -0.3% | [-0.4%, -0.2%] | 6 |
| Improvements (secondary) | - | - | 0 |
| All (primary) | -0.3% | [-0.4%, -0.2%] | 6 |
- Regression might be noise (and isn’t big enough to care about even if it isn’t)
Nominated Issues
- “in asm!() using a local numeric label made of all 0’s and 1’s gives a confusing error” rust#94426
- nominated by @Josh Triplett
- (assumed for suggesting what the behaviour here should be)
- issue reporter comments:
As per Rust By Example, we use 2: as a local label there to work around an LLVM bug that mistakes labels like 0:, 1:, or 10: for binary. This example works. However, if we don’t know about this rule, and we try to use 0: instead, the error we get is confusing
- No I-compiler-nominated RFCs this time.
Oldest PRs waiting for review
- “Stop using LLVM struct types for array/pointer offset GEPs” rust#122325 (last review activity: 3 months ago)
- cc @Nikita Popov
- “Apply dllimport in ThinLTO for -Z dylib-lto” rust#122790 (last review activity: 3 months ago)
- cc @Wesley Wiser
- “[WIP] Enforce may-define-must-define for ATPITs” rust#123046 (last review activity: 2 months ago)
- cc: @aliemjay
- “CFI: Fix fn items, closures, and Fn trait objects” rust#123082 (last review activity: 2 months ago)
- cc @Michael Goulet (compiler-errors)
Next meetings’ agenda draft: hackmd link