T-compiler Meeting Agenda 2023-11-30
Announcements
- RFC: improve the onboarding experience of t-compiler + t-compiler-contributor (Zulip thread):
- HackMD document: https://hackmd.io/Cp0Ktm2KQeS4TNmFn2UwWQ
- @Santiago Pastorino @lqd and @apiraino are planning to work a bit on the rustc-dev + forge documentation as well
- 👉 Feedback and wishlists around this topic are welcome!
- 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 (calendar link)
- AFIT/RPITIT Impl Triage at time:2023-11-30T16:00:00-05:00
- Types team meeting at time:2023-12-04T10:00:00-05:00
- [Types] Rotating new solver / formality / polonius deep dive at time:2023-12-04T11:00:00-05:00
MCPs/FCPs
- New MCPs (take a look, see if you like them!)
- “Require
--known-broken-llvm
flag for x.py to skip codegen tests on old LLVM” compiler-team#687 (Zulip) - “Semantics of
-Cinstrument-coverage=all
” compiler-team#690 (Zulip) - “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip)
- “New Tier-3 target:
wasm32-wasi-preview2
” compiler-team#694 (Zulip) - “Smooth the renaming transition of
wasm32-wasi
” compiler-team#695 (Zulip)
- “Require
- Old MCPs (stale MCP might be closed as per MCP procedure)
- None at this time
- Old MCPs (not seconded, take a look)
- “De-llvm some integer intrinsics that on the Rust side always use
u32
” compiler-team#693 (Zulip) (last review activity: about 3 days ago)
- “De-llvm some integer intrinsics that on the Rust side always use
- Pending FCP requests (check your boxes!)
- “Add a new
--build-id
flag to rustc” compiler-team#635 (Zulip) - “Retire the mailing list and make all decisions on zulip” compiler-team#649 (Zulip)
- “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
- “make soft_unstable show up in future breakage reports” rust#116274
- “Stabilize Wasm target features that are in phase 4 and 5” rust#117457
- “guarantee that char and u32 are ABI-compatible” rust#118032
- “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)
- “Report all lints, even if other errors already occurred.” compiler-team#633 (Zulip)
- “Add infrastructure to “compute the ABI of a Rust type, described as a C type”” compiler-team#672 (Zulip)
- “Stabilize
--json=unused-externs(-silent)
” compiler-team#674 (Zulip) - “Support response files generated by ninja with
@ninja:path
syntax” compiler-team#684 (Zulip) - “Add
-Zexperimental-target
” compiler-team#685 (Zulip) - “Stop emitting less useful debug sections:
.debug_pubnames
and.debug_pubtypes
” compiler-team#688 (Zulip) - “Add -Z small-data-threshold” compiler-team#689 (Zulip)
- Accepted MCPs
- " Add
$message_type
field to distinguish json diagnostic outputs" compiler-team#673 (Zulip) - “Set alignment of
i128
to 128 bits for x86” compiler-team#683 (Zulip)
- " Add
- Finalized FCPs (disposition merge)
- “Tracking issue for dyn upcasting coercion” rust#65991
- “TAIT defining scope options” rust#107645
- “[style edition 2024] Combine all delimited exprs as last argument” rust#114764
- “dropck_outlives check whether generator witness needs_drop” rust#117134
- “Stabilize C string literals” rust#117472
- “generator layout: ignore fake borrows” rust#117712
WG checkins
- @_WG-llvm by @nagisa and @Nikita Popov (previous checkin):
text
Backport nominations
FIY Some stable backports were preemptively approved last week (Zulip thread):
- clarify fn discriminant guarantees: only free lifetimes may get erased
- Move subtyper below reveal_all and change reveal_all
T-compiler stable / T-compiler beta
- :beta: 1.75 “Build pre-coroutine-transform coroutine body on error” rust#117686
- Fixes an ICE #117670
- nominated by Wesley (comment) because people are already tripping on this
- :beta: 1.75 “ConstProp: Correctly remove const if unknown value assigned to it.” rust#118426
- thanks @Alona Enraght-Moony !
- Fixes rust#118328, P-high regression of a fuzzer-generated unsoundness
- :beta: 1.75 “Dispose llvm::TargetMachines prior to llvm::Context being disposed” rust#118464
- Fixes #118462 (thanks @Wesley Wiser ), a
P-high
UB on ARM (Windows only)
- Fixes #118462 (thanks @Wesley Wiser ), a
- :stable: “Fix coroutine validation for mixed panic strategy” rust#118422
PRs S-waiting-on-team
- “[
RFC 3086
] Attempt to try to resolve blocking concerns” rust#117050- T-lang approved without FCP (comment)
- anything else blocking? Is T-compiler still interested here?
- “Remap paths from other crates” rust#117836
- T-compiler mentioned to have a look (comment) and figure out if there are ramifications
- “guarantee that char and u32 are ABI-compatible” rust#118032
- T-lang discussed (comment), opened FCP process
- Other issues in progress or waiting on other teams
Issues of Note
Short Summary
- 2 T-compiler P-critical issues
- 61 T-compiler P-high issues
- 1 P-critical, 2 P-high, 4 P-medium, 1 P-low regression-from-stable-to-beta
- 0 P-critical, 1 P-high, 3 P-medium, 2 P-low regression-from-stable-to-nightly
- 1 P-critical, 39 P-high, 100 P-medium, 18 P-low regression-from-stable-to-stable
P-critical
- “Miscompilation of Bevy (and some wgpu) apps resulting in segfault on macOS.” rust#117902
- Actually will be fixed by fixing the
wgpu
crate (comment and following)
- Actually will be fixed by fixing the
- “1.74 causes an internal compiler error: broken MIR in Item” rust#117976
- No
P-critical
issues forT-types
this time.
P-high regressions
- “regression: new resolution failures in 1.74” rust#117056
- @_apiraino thinks these are mostly fixed (anything missing here?)
- “Problem running a method on the output of a function that returns an associated type (“missing optimized MIR”)” rust#117997
- Will be fixed by #117076 (comment), already merged
Performance logs
A good week, despite a few PRs that pnkfelix opted not to mark as triaged. In particular, a broad set of primary benchmarks improved, due to improvements to resolve (PR #118188) and a one-pass rewrite of exhaustiveness (PR #117611).
Triage done by @pnkfelix. Revision range: 4f3da903..df0295f0
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.6% | [0.1%, 1.5%] | 15 |
Regressions (secondary) | 1.3% | [0.2%, 2.4%] | 16 |
Improvements (primary) | -0.7% | [-2.1%, -0.3%] | 66 |
Improvements (secondary) | -1.7% | [-8.1%, -0.2%] | 43 |
All (primary) | -0.5% | [-2.1%, 1.5%] | 81 |
1 Regressions, 5 Improvements, 5 Mixed; 2 of them in rollups 84 artifact comparisons made in total
Regressions
Rollup of 4 pull requests #118319 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.1%, 0.8%] | 23 |
Regressions (secondary) | 0.5% | [0.2%, 1.0%] | 11 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | - | - | 0 |
All (primary) | 0.4% | [0.1%, 0.8%] | 23 |
- The bulk (in this case > 0.31%) of the primary regressions are to bitmaps and libc, in a variety of incremental modes.
- nnethercote noted that this seems like it must be PR #118311 (“merge DefKind::Coroutine into Defkind::Closure”), and confirmed it by benchmarking that specific commit.
- follow-up PR’s have been proposed, but we have not successfully found one that undoes the regression.
- meanwhile, a follow-on PR, #118188, has landed that is coupled to #118311. This PR #118188 seems to have wide benefits. So it may not be worthwhile to spend time trying to figure out the regression injected by #118311.
- not marking as triaged yet.
Improvements
Remove PredicateKind::ClosureKind
#118120 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.2% | [-0.3%, -0.2%] | 4 |
Improvements (secondary) | -3.8% | [-8.1%, -0.5%] | 14 |
All (primary) | -0.2% | [-0.3%, -0.2%] | 4 |
- slight improvements to clap check-{incr-full,full}, cargo check-full, and diesel doc-full
Cache flags for ty::Const
#118189 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.3%, -0.2%] | 10 |
Improvements (secondary) | -0.3% | [-0.3%, -0.2%] | 3 |
All (primary) | -0.3% | [-0.3%, -0.2%] | 10 |
- slight improvements to bitmaps {check-full,opt-full}, serde {check-full,debug-full}, diesel check-full
- the remaining 5 are doc-full improvements.
Indicate that multiplication in Layout::array cannot overflow #118228 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.4% | [-0.5%, -0.3%] | 3 |
Improvements (secondary) | - | - | 0 |
All (primary) | -0.4% | [-0.5%, -0.3%] | 3 |
- switches to unsafe { element_size.unchecked_mul(n) } with a big ol' safety comment about why.
- improved opt incr-patched:println for clap, image, and cargo benchmarks.
AmbiguityCause
should not eagerly format strings #118267 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.4% | [-0.8%, -0.2%] | 5 |
Improvements (secondary) | - | - | 0 |
All (primary) | -0.4% | [-0.8%, -0.2%] | 5 |
- improved check builds for clap {incr-full,full,incr-unchanged} and hyper {incr-full,full}
resolve: Feed the def_kind
query immediately on DefId
creation #118188 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | -0.3% | [-0.5%, -0.2%] | 58 |
Improvements (secondary) | -0.5% | [-1.0%, -0.1%] | 34 |
All (primary) | -0.3% | [-0.5%, -0.2%] | 58 |
- wide range of benchmarks improved on incr-unchanged and incr-patched variants: stm32f4, diesel, bitmaps, cranelift-codegen, syn, serde, et cetera.
- as noted above with #118319, this is coupled with a PR (#118311) associated with some regressions.
Mixed
Refactor binary_search_by
to use conditional moves #117722 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.4% | [0.4%, 0.4%] | 1 |
Regressions (secondary) | 1.3% | [1.3%, 1.4%] | 2 |
Improvements (primary) | -1.4% | [-1.9%, -0.2%] | 5 |
Improvements (secondary) | -1.8% | [-2.6%, -1.3%] | 8 |
All (primary) | -1.1% | [-1.9%, 0.4%] | 6 |
- The single primary regression here seems to be a measurement blip, based on the 30-day history.
- Even if it weren’t, the improvements would outweigh the regression.
- Marked as triaged.
Rewrite exhaustiveness in one pass #117611 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 1.1% | [1.0%, 1.1%] | 2 |
Regressions (secondary) | 1.6% | [0.3%, 2.4%] | 9 |
Improvements (primary) | -0.9% | [-2.0%, -0.2%] | 11 |
Improvements (secondary) | -0.2% | [-0.2%, -0.2%] | 1 |
All (primary) | -0.6% | [-2.0%, 1.1%] | 13 |
- primary improvements were to html5ever, cranelift-codegen, exa, and image.
- unicode-normalization was the main primary regression, by up to 1.15% (check incr-full); but its worth noting that it was very close to the significance factor (1.13%) for that benchmark, so its borderline historically.
- already marked as triaged by nnethercote
rustc: Make def_kind
mandatory for all DefId
s #118250 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | - | - | 0 |
Regressions (secondary) | 0.5% | [0.5%, 0.5%] | 2 |
Improvements (primary) | -0.1% | [-0.1%, -0.1%] | 5 |
Improvements (secondary) | -0.3% | [-0.5%, -0.2%] | 9 |
All (primary) | -0.1% | [-0.1%, -0.1%] | 5 |
- already marked as triaged by nnethercote. (regressions are confined to secondary match-stress benchmark).
Add debug_assert_nounwind
and convert assert_unsafe_precondition
#110303 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.4%, 0.6%] | 4 |
Regressions (secondary) | 0.2% | [0.2%, 0.3%] | 2 |
Improvements (primary) | -0.4% | [-0.4%, -0.4%] | 1 |
Improvements (secondary) | -0.6% | [-0.6%, -0.6%] | 2 |
All (primary) | 0.3% | [-0.4%, 0.6%] | 5 |
- already marked as triaged by nnethercote (hoped to be churn/noise).
Rollup of 7 pull requests #118405 (Comparison Link)
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions (primary) | 0.5% | [0.4%, 0.6%] | 3 |
Regressions (secondary) | - | - | 0 |
Improvements (primary) | - | - | 0 |
Improvements (secondary) | -0.5% | [-1.3%, -0.2%] | 4 |
All (primary) | 0.5% | [0.4%, 0.6%] | 3 |
- regressions are confined to clap opt {full,incr-full,incr-patched:println}
- not marking as triaged
Nominated Issues
- No I-compiler-nominated issues this time.
- “RFC: Packages as (optional) namespaces” rfcs#3243
Oldest PRs waiting for review
- “Stabilize
extended_varargs_abi_support
” rust#116161- author pinged @wesley wiser
- “Create the previous dep graph index on a background thread” rust#116375
- cc: cjgillot
- “Provide context when
?
can’t be called because ofResult<_, E>
” rust#116496- cc: @compiler errors
Next week’s WG checkins
- @_T-rust-analyzer by @Lukas Wirth
Next meetings' agenda draft: hackmd link