T-compiler Meeting Agenda 2023-09-14
Announcements
- Rust stable dot release 1.72.1 will likely be postponed to next week (Zulip comment in #t-release)
- Types team meeting: backlog bonanza at time:2023-09-18T10:00:00-04:00
- Types team meeting: Rotating new solver / formality / polonius deep dive at time:2023-09-18T11:00:00-04:00
- Reminder: if you see a PR/issue that seems like there might be legal implications due to copyright/IP/etc, please let the council know (or at least message @davidtwco or @Wesley Wiser so we can pass it along).
Other WG meetings (calendar link)
- wg-async weekly at time:2023-09-14T12:00:00-04:00
- AFIT/RPITIT Impl Triage at time:2023-09-14T16:00:00-04:00
- wg-debugging triage meeting at time:2023-09-18T10:00:00-04:00
- wg-rls-2.0 weekly sync-up at time:2023-09-18T11:00:00-04: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)
- “Consistently use "region" terminology in later stages of the compiler” compiler_team#634 (Zulip) (last review activity: 3 months ago)
- “Add a new
--build-id
flag to rustc” compiler_team#635 (Zulip)) (last review activity: 3 months ago) - “Simplify and improve explicitness of the check-cfg syntax” compiler_team#636 (Zulip) (last review activity: 3 months ago)
- “Add support for visionOS targets” compiler_team#642 (Zulip) (last review activity: about 12 days ago)
- “Add illumos Tier3 targets” compiler_team#644 (Zulip) (last review activity: about 51 days ago)
- “Match the behavior of
strip
andsplit-debuginfo
across platforms” compiler_team#669 (Zulip) (last review activity: about 9 days ago) - “Allow overriding default codegen backend on a per-target basis” compiler_team#670 (Zulip) (last review activity: about 6 days ago)
- “Add infrastructure to "compute the ABI of a Rust type, described as a C type"” compiler_team#672 (Zulip) (last review activity: about 6 days ago)
- Pending FCP requests (check your boxes!)
- “Retire the mailing list and make all decisions on zulip” compiler_team#649 (Zulip)
- " Add
type
field to distinguish json diagnostic outputs" compiler_team#673 (Zulip) - “Tracking issue for dyn upcasting coercion” rust#65991
- “Add allow-by-default lint for unit bindings” rust#112380
- “stabilize combining +bundle and +whole-archive link modifiers” rust#113301
- “Support overriding
warnings
level for a specific lint via command line” rust#113307
- Things in FCP (make sure you’re good with it)
- “Add a blanket flag to enable/disable codegen UB checks” compiler_team#625 (Zulip)
- “Add support for Zephyr OS” compiler_team#629 (Zulip)
- “Report all lints, even if other errors already occurred.” compiler_team#633 (Zulip)
- “Add option to pass environment variables” compiler_team#653 (Zulip)
- “Add tidy rule against
issue-[0-9]+.rs
tests” compiler_team#658 (Zulip) - “Add
builtin:$path
option to the-L
flag” compiler_team#659 (Zulip) - “Promote loongarch64-unknown-none* to Tier 2” compiler_team#664 (Zulip)
- “Support larger sizes in rmeta tables and incr comp alloc offsets” compiler_team#666 (Zulip)
- “Condemn
asmjs-unknown-emscripten
to push a boulder up a hill for eternity” compiler_team#668 (Zulip) - “Create a binary-size working group” compiler_team#671 (Zulip)
- “Stabilize
--json=unused-externs(-silent)
” compiler_team#674 (Zulip) - “Change how closure and generator types are printed to avoid clash with slice types” compiler_team#675 (Zulip)
- Accepted MCPs
- “Make unknown/renamed/removed lints passed via command line respect lint levels” compiler-team#667
- Finalized FCPs (disposition merge)
- None
WG checkins
- T-types checkin by @Jack Huey (HackMD link)
- General team things
- We have an in-person meetup in Brussels next month prior to EuroRust
- Let us know if there’s anything you’d like us to discuss
- We have an in-person meetup in Brussels next month prior to EuroRust
- Planning to open a stabilization report “any day now” for AFIT/RPITIT
- #114740, #115008, #114933 all open to try to fix unsoundness w.r.t TAITs
- Ongoing work to generate a-mir-formality code via SMIR
- Work on new trait solver: overflow handling and provisional cache
- There’s a WIP stabilization report for trait upcasting
- Open FCP for negative impls
- @lqd has prepared a PR that reimplements the existing borrow-check in a polonius style
- General team things
Backport nominations
T-compiler stable / T-compiler beta
- :beta: [1.73] “MCP661: Move wasm32-wasi-preview1-threads target to Tier 2” rust#115345
- (previously Tier 3)
- nominated by @Wesley Wiser (comment): PR author recommends backport as this PR bumps the version of wasi-libc we use which fixes some issues with the target. The target is now Tier 2 in 1.73 so backporting the fix will improve the state of the target in its first Tier 2 release.
- :beta: [1.73] “fix(resolve): update def if binding is warning ambiguity” rust#115389
- Fixes beta regression #115774 from the latest crater run, hitting a few crates (so potentially annoying?)
- :beta: [1.73] “Don’t require
Drop
for[PhantomData<T>; N]
whereN
andT
are generic, ifT
requiresDrop
” rust#115527- authored by @oli
- Closes fixes #115403 and #115410 (also raised an error in the latest crater run, see comment)
- :beta: [1.73] “Only suggest turbofish in patterns if we may recover” rust#115785
- authored by @fmease
- closes #115780 a perhaps P-high regression (produces an error falsely suggesting to use the
::
operator)
- :beta: [1.73] “Expose try_destructure_mir_constant_for_diagnostics directly to clippy” rust#115819
- fresh from @oli
- hopefully squashing #83085: avoid clippy trying to use the query in ways that incremental caching will inevitably cause problems with
- No stable nominations for
T-compiler
this time.
PRs S-waiting-on-team
- Other issues in progress or waiting on other teams
Issues of Note
Short Summary
- 2 T-compiler P-critical issues
- 62 T-compiler P-high issues
- 1 P-critical, 2 P-high, 1 P-medium, 1 P-low regression-from-stable-to-beta
- 0 P-critical, 1 P-high, 2 P-medium, 2 P-low regression-from-stable-to-nightly
- 3 P-critical, 38 P-high, 100 P-medium, 18 P-low regression-from-stable-to-stable
P-critical
- “ICE: unexpected initial operand type.” rust#114858
- partially fixed in rust#115215, needs more work though (comment)
- “Miscompile with
-Copt-level=1
after update to LLVM 17” rust#115681- Upstream fix in progress at llvm-project#65882
- “RPIT hidden types can be ill-formed” rust#114728
- will be fixed by rust#114933, authored by @aliemjay, being reviewed
- “ICE when building documentation: DefId(20:797 …) does not have a “object_lifetime_default”” rust#115179
- fixed by rust#115276 (beta accepted)
P-high regressions
- “regression: as_place unwrap None” rust#115778
- @apiraino assigned P-high (but unsure about priority), needs bisection and maybe a bit more context. Might be related to #110453
- “regression: generic args in patterns require the turbofish syntax” rust#115780
- fixed by #115785
Unassigned P-high nightly regressions
- No unassigned
P-high
nightly regressions this time.
Performance logs
An interesting week. We saw a massive improvement to instruction-counts across over a hundred benchmarks, thanks to #110050 an improved encoding scheme for the dependency graphs that underlie incremental-compilation. However, these instruction-count improvements did not translate to direct cycle time improvements. We also saw an improvement to our artifact sizes due to #115306. Beyond that, we had a scattering of small regressions to instruction-counts that were justified because they were associated with bug fixes.
Triage done by @pnkfelix. Revision range: 15e52b05..7e0261e7
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 2.8% | [0.7%, 10.2%] | 11 |
Regressions (secondary) | 1.5% | [0.4%, 7.7%] | 9 |
Improvements (primary) | -1.7% | [-5.9%, -0.2%] | 112 |
Improvements (secondary) | -1.3% | [-2.7%, -0.4%] | 41 |
All (primary) | -1.3% | [-5.9%, 10.2%] | 123 |
3 Regressions, 2 Improvements, 5 Mixed; 2 of them in rollups 84 artifact comparisons made in total
Regressions
Add FreezeLock
type and use it to store Definitions
#115401 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.3% | [0.2%, 0.4%] | 11 |
Regressions (secondary) | 0.3% | [0.3%, 0.3%] | 1 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.3% | [0.2%, 0.4%] | 11 |
- The impact here is hypothesized to be due to serial/parallel trade-off; we benchmark the serial case and observe a small regression, while the parallel case is observing an improvement of roughly the same caliber.
- Marked as triaged
Rollup of 6 pull requests #115672 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 4.2% | [0.8%, 9.8%] | 5 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 4.2% | [0.8%, 9.8%] | 5 |
- already marked as triaged
- all five regressions are to doc benchmarks, due to new feature added in https://github.com/rust-lang/rust/pull/115201
Use the same DISubprogram for each instance of the same inlined function within a caller #115417 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 1.0% | [0.6%, 1.3%] | 3 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 1.0% | [0.6%, 1.3%] | 3 |
- already marked as triaged
- regression was expected, though we may be able to claw back performance after resolving rust#115455
Improvements
Span tweaks #115594 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.4% | [-0.4%, -0.4%] | 1 |
Improvements (secondary) | -0.4% | [-0.5%, -0.3%] | 6 |
All (primary) | -0.4% | [-0.4%, -0.4%] | 1 |
Disentangle Debug
and Display
for Ty
. #115661 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.3%, -0.2%] | 4 |
Improvements (secondary) | -0.3% | [-0.5%, -0.2%] | 3 |
All (primary) | -0.3% | [-0.3%, -0.2%] | 4 |
Mixed
Represent MIR composite debuginfo as projections instead of aggregates #115252 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 3.9% | [3.9%, 3.9%] | 1 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.3%, -0.3%] | 2 |
Improvements (secondary) | -0.4% | [-0.4%, -0.3%] | 4 |
All (primary) | 1.1% | [-0.3%, 3.9%] | 3 |
- The single regression is to exa-0.10.1-opt-full
- However, nnethercote noted that this PR introduced broad (if small) regressions to linked artifact (aka binary) sizes (in both opt and debug settings)
- not marking as triaged
Use a specialized varint + bitpacking scheme for DepGraph encoding #110050 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 0.5% | [0.3%, 0.8%] | 4 |
Improvements (primary) | -1.7% | [-5.8%, -0.3%] | 104 |
Improvements (secondary) | -1.4% | [-2.9%, -0.5%] | 32 |
All (primary) | -1.7% | [-5.8%, -0.3%] | 104 |
- on its surface, the improvements to instruction counts here clearly outweigh the regressions
- it is worth noting that the cycle counts did not see the same trends; there were zero improvements and 7 primary regressions to cycle counts.
- still, marking as triaged; this PR has gone through enough performance evaluation already.
Rollup of 7 pull requests #115665 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.7% | [0.6%, 0.7%] | 2 |
Regressions (secondary) | 0.6% | [0.5%, 0.7%] | 5 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -0.3% | [-0.3%, -0.3%] | 1 |
All (primary) | 0.7% | [0.6%, 0.7%] | 2 |
- primary regressions were helloworld-check (incr-unchanged and incr-patched:println)
- marking as triaged; not worth investigating a rollup for that benchmark.
Avoid a source_span
query when encoding Spans into query results #115657 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.3%, 0.4%] | 2 |
Regressions (secondary) | 0.7% | [0.4%, 1.0%] | 7 |
Improvements (primary) | -0.4% | [-0.4%, -0.4%] | 2 |
Improvements (secondary) | -0.5% | [-0.6%, -0.4%] | 4 |
All (primary) | -0.0% | [-0.4%, 0.4%] | 4 |
- primary regressions are to diesel-check (full and incr-full).
- This is fixing a soundness issue with the dep-graph maintenance; therefore, these regressions seem tolerable.
- Marking as triaged
Encode only MIR reachable from other crates #115306 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.8% | [0.3%, 2.4%] | 15 |
Regressions (secondary) | 1.9% | [0.3%, 9.1%] | 7 |
Improvements (primary) | -1.3% | [-2.7%, -0.4%] | 12 |
Improvements (secondary) | -0.9% | [-1.2%, -0.7%] | 5 |
All (primary) | -0.1% | [-2.7%, 2.4%] | 27 |
- the big (>1%) primary regressions were to three check-incr-unchanged cases: cranelift-codegen-0.82.1, html5ever-0.26.0, and hyper-0.14.18
- the regressions seem unfortunate, but tolerable given the improvement to linked artifact sizes
- marking as triaged
Nominated Issues
- None
- No I-compiler-nominated RFCs this time.
Oldest PRs waiting for review
- “Fix ICE when trying to convert
ConstKind::Error
to usize” rust#113712(last review activity: about 46 days ago)- cc: @uwu
- “Pretty-print argument-position impl trait to name it.” rust#113955(last review activity: about 31 days ago)
- cc @Waffle Lapkin
Next week’s WG checkins
- @_WG-mir-opt by @oli
- @_T-rust-analyzer by @Lukas Wirth
Next meetings' agenda draft: https://hackmd.io/CG_A-TBVTBqsH_mfID3Fvg