T Compiler Meeting Agenda 2022 05 05

T-compiler Meeting Agenda 2022-05-05

Announcements

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (not seconded, take a look)
    • “Accept pc in place of unknown and unknown in place of pc for x86_64 and i?86 targets” compiler-team#441 (last review activity: 10 months ago)
    • “Make -Z binary-dep-depinfo the default behavior” compiler-team#464 (last review activity: 7 months ago)
    • “Tier 3 target proposal: riscv64gc-linux-android (Android target for riscv64gc)” compiler-team#472 (last review activity: 4 months ago)
    • -Dwarnings to cover all warnings” compiler-team#473 (last review activity: 4 months ago)
    • “Build-time execution sandboxing” compiler-team#475 (last review activity: 4 months ago)
    • “Dealing with type/const ambiguities” compiler-team#480 (last review activity: 3 months ago)
    • “Removing codegen logic for nvptx-nvidia-cuda (32-bit target)” compiler-team#496 (last review activity: about 47 days ago)
    • “Add attribute to run specific tests in an isolated process” compiler-team#508 (last review activity: about 7 days ago)
    • “Stabilize -Zgcc-ld=lldcompiler-team#510 (last review activity: about 7 days ago)
  • Pending FCP requests (check your boxes!)
    • “Tracking issue for Consistent no-prelude attribute (RFC 501)” rust#20561
    • “Tracking Issue for -Z terminal-widthrust#84673
    • “Increase the minimum linux-gnu versions” rust#95026
    • “Remove label/lifetime shadowing warnings” rust#96296
  • Things in FCP (make sure you’re good with it)
    • No FCP requests this time.
  • Accepted MCPs
    • No new accepted proposals this time.
  • Finalized FCPs (disposition merge)
    • “Enforce Copy bounds for repeat elements while considering lifetimes” rust#95819
    • “Stabilize $$ and ${ignore} in Rust 1.62.0” rust#95860
    • “Remove mutable_borrow_reservation_conflict lint and allow the code pattern” rust#96268

WG checkins

  • preliminary work on removing ProjectionKind::Deref: #95857
  • @Jak{e,ob} Degen reviewed the MIR and documented its semantics: #95320

No update from wg-polymorphization. Members of the working group are focusing on other areas.

Backport nominations

T-compiler beta / T-compiler stable

  • No backport nominations for T-compiler this time.

T-rustdoc beta / T-rustdoc stable

  • No backport nominations for T-rustdoc this time.

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • “generalize “incoherent impls” impl for user defined types” rust#96520
    • PR author @lcnr
    • @Jack Huey and @Vadim Petrochenkov left some comments
    • mentioning just in case T-compiler need to do more reviewing (also T-libs have a say here)

Oldest PRs waiting for review

T-compiler

  • “Increase the minimum linux-gnu versions” rust#95026 (last review activity: about 34 days ago)
    • was pending RFC approval, now approved
    • seems to also be approved by @_Pietro Albini (comment) and already is mentioned in the release notes for 1.61
    • maybe the S-waiting-on-review flag can be lifted?
  • “Cache more queries on disk” rust#95418 (last review activity: about 33 days ago)
  • “AddNicheCases MirPass” rust#95652 (last review activity: about 29 days ago)
    • last comments from assignee @RalfJ
  • “Support tool lints with the #[expect] attribute (RFC 2383)” rust#95542 (last review activity: about 29 days ago)
    • cc: @Wesley Wiser (sorry for pinging two meetings in a row)
  • “Warn about dead tuple struct fields” rust#95977 (last review activity: about 21 days ago)
    • previous review from @eddyb
  • “Implement #[deprecated_safe]” rust#95025 (last review activity: about 21 days ago)
    • cc @eddyb and @Esteban Küber ?
  • “Warn on unused #[doc(hidden)] attributes on trait impl items” rust#96008 (last review activity: about 20 days ago) It’s marked as waiting for review: is it the actual status (based on latest comments)?
  • “Memory-map the dep-graph instead of reading it up front” rust#95543 (last review activity: about 20 days ago)
    • was reviewed by @mw, should the review flag be switched to waiting on author?
  • “Disable unwinding for emscripten again” rust#95950 (last review activity: about 18 days ago)
    • side question for @pnkfelix: what would an actionable for this comment be? Specifically, who should own writing the MCP to document the process of enabling unwinding again?

Issues of Note

Short Summary

P-critical

T-compiler

  • “3.2_f32 formatted as 0 on powerpc64le” rust#96306
    • miscompilation on tier 2 platform powerpc64le-unknown-linux-gnu
    • @nagisa provided some insights in comment
    • bug seems to not reproduce on latest nightly (comment) but more related regressions show up
    • (reassess priority?)

T-rustdoc

  • No P-critical issues for T-rustdoc this time.

P-high regressions

P-high beta regressions

  • No P-high beta regressions this time.

Unassigned P-high nightly regressions

  • “Regression in nightly-2022-05-01 relating to trait objects” rust#96664
    • handled by @cjgillot in PR #96715
  • “cycle detected when computing the super predicates of ...rust#96665
    • related to #96664
    • equally handled by @cjgillot in PR #96715

Performance logs

triage logs for 2022-05-03

Performance overall improved in the last week, but some of this is due to fixing regressions from prior weeks. This week also brings an average of 4% improvement in memory usage across all profiles due to #95171 bumping the LLVM/clang used on x86_64-unknown-linux-gnu to compile C and C++ code linked into rustc.

Triage done by @simulacrum. Revision range: 1c988cfa0b7f4d3bc5b1cb40dc5002f5adbfb9ad..468492c2af3993f18b1fe98052200575c4a2e678

Summary:

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 13 1 78 29 91
mean 0.8% 0.3% -0.9% -0.8% -0.7%
max 1.5% 0.3% -2.7% -2.1% -2.7%

4 Regressions, 3 Improvements, 1 Mixed; 1 of them in rollups 52 artifact comparisons made in total

Regressions

Rollup of 8 pull requests #96428 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 7 2 1 0 8
mean 1.3% 0.3% -0.4% N/A 1.1%
max 1.8% 0.3% -0.4% N/A 1.8%

Looks likely to be related to the new impl Default for AssertUnwindSafe, though detailed query pages do not reflect the regressions. Marking the regression as triaged, because it’s unlikely we would want to revert the impl at this point. However, it’s probably the case that impls for public standard library types may want to avoid being rolled up, as they can influence downstream performance across both rustdoc and regular compilation.

Enforce Copy bounds for repeat elements while considering lifetimes #95819 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 2 0 0 0 2
mean 0.8% N/A N/A N/A 0.8%
max 1.0% N/A N/A N/A 1.0%

Incremental-only regressions in a single benchmark. Looks likely to be a somewhat real change, but not one we can do much about: the extra enforcement naturally adds dependency edges which require re-computing.

Handle generic bounds in a uniform way in HIR #93803 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 11 4 0 0 11
mean 0.3% 0.3% N/A N/A 0.3%
max 0.5% 0.3% N/A N/A 0.5%

A regression primarily to diesel (quite common this week), but relatively slight and with a relatively good tradeoff to code maintenance. Earlier PR runs had some slight improvements which were used as a justification for regresions on benchmarks; this doesn’t seem to be the case anymore, so asked for an updated justification on the regression.

Inline core::panic::Location methods #96348 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 0 11 0 0 0
mean N/A 0.5% N/A N/A N/A
max N/A 0.8% N/A N/A N/A

Secondary-only regressions, most likely due to slightly different codegen in relatively hot code (e.g., due to increased or decreased register pressure). Not likely to be an important change.

Improvements

Mixed

Inline __iterator_get_unchecked for some iterator adapters. #92566 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 1 2 3 1 4
mean 0.2% 0.3% -0.4% -0.2% -0.2%
max 0.2% 0.3% -0.4% -0.2% -0.4%

Update LLVM used for building rustc in CI for x64 #95171 (Comparison Link)

Regressions (primary) Regressions (secondary) Improvements (primary) Improvements (secondary) All (primary)
count 0 0 1 0 1
mean N/A N/A -0.5% N/A -0.5%
max N/A N/A -0.5% N/A -0.5%

A solid improvement in memory usage, with a rough average of 4% less memory used across many check, debug, and opt builds, presumably due to better optimizations when compiling C and C++ code linked into rustc.

Nominated Issues

T-compiler

  • “Rust beta: “cannot infer type” when compiling bottom crate” rust#96074
    • previously discussed
    • @Josh Triplett nominated also for T-compiler (comment)
    • which attracted comments from @Esteban Küber @Jack Huey @lcnr
    • also asked to beta backport a revert (#96489 approved, comment)
    • Can the I-nominated-compiler be removed?

RFC

  • No nominated RFCs for T-compiler this time.