T Compiler Meeting Agenda 2023 12 07

T-compiler Meeting Agenda 2023-12-07

Announcements

  • 1.74.1 is released (Zulip) and blog post
    • With some P-high/critical regression were fixed (a big thanks to those that helped debugging and fixing)
  • 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)

MCPs/FCPs

WG checkins

  • @_T-rust-analyzer checkin by @Lukas Wirth (previous checkin):

    Big things happened! rust-analyzer now uses proper spans for associating things from macro inputs to expansions (although not quite what rustc uses, as rustc’s spans are the opposite of being incremental), they are roughly (FileId, AstId, TextRangeRelativeToAstId, SyntaxContextId), https://github.com/rust-lang/rust-analyzer/pull/15959. That PR also switched our $crate resolution over to the marking SyntaxContext approach that rustc uses meaning we can now start making all of r-a’s name resolution hygienic. Finally, support for implicit format args in almost all IDE features has landed, https://github.com/rust-lang/rust-analyzer/pull/16027

Backport nominations

T-compiler stable / T-compiler beta

  • No beta nominations for T-compiler this time.
  • :stable: “Make subtyping explicit in MIR” rust#115025
    • This is a dependency of #116415 (stable backport approved 2 weeks ago, fixes a number of regressions and ICEs)
    • it probably /needs/ to be backported into 1.74.1 as well (comment)

T-types stable / T-types beta

  • No beta nominations for T-types this time.
  • No stable nominations for T-types this time.

PRs S-waiting-on-team

T-compiler

Issues of Note

Short Summary

P-critical

T-compiler

  • “Miscompilation of Bevy (and some wgpu) apps resulting in segfault on macOS.” rust#117902
    • long and painful reduction (thanks @lqd and @Ben Kimock (Saethlin)!)
    • finally cornered to an LLVM issue (submitted as llvm-project#74680, see comment))
  • “1.74 causes an internal compiler error: broken MIR in Item” rust#117976
    • stable backports of #116415 and #115025 into 1.74.1 should fix this

T-types

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

P-high regressions

P-high beta regressions

  • “regression: new resolution failures in 1.74” rust#117056
    • (mentioned last week) these regressions should hopefully be all fixed
  • “Problem running a method on the output of a function that returns an associated type (“missing optimized MIR”)” rust#117997
    • Culprit identified in #117076 cc: @petrochenkov (reviewer)
    • Issue prioritization review: really P-high?

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2023-12-05

A small number of perf changes that unfortunately led to quite a few perf regressions. A large chunk of those regressions were in rustdoc and were considered acceptable since rustdoc is now doing strictly more work. Some other regressions have already been fixed and will hopefully soon be merged. The last of the regressions are still under investigation, but hopefully they will be resolved soon.

Triage done by @rylev. Revision range: df0295f0..9358642e

Summary:

(instructions:u) mean range count
Regressions (primary) 3.0% [0.2%, 12.3%] 53
Regressions (secondary) 4.1% [0.2%, 11.6%] 102
Improvements (primary) -0.3% [-0.5%, -0.1%] 65
Improvements (secondary) -0.6% [-1.2%, -0.2%] 25
All (primary) 1.1% [-0.5%, 12.3%] 118

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

Regressions

Rollup of 5 pull requests #118473 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 1.4% [1.4%, 1.4%] 1
Regressions (secondary) 0.1% [0.1%, 0.1%] 3
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 1.4% [1.4%, 1.4%] 1
  • Noise

Restore #![no_builtins] crates participation in LTO. #113923 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 6.4% [0.8%, 12.4%] 17
Regressions (secondary) 5.3% [0.5%, 12.2%] 72
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 6.4% [0.8%, 12.4%] 17
  • Builtin function symbols that erroneously do not get GCed
  • #118568 seems to reverse these perf regressions.

Portable SIMD subtree update #118077 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.7% [0.3%, 2.1%] 14
Regressions (secondary) 1.3% [0.2%, 2.2%] 23
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.7% [0.3%, 2.1%] 14
  • All doc regressions due to more docs being generated and thus acceptable

Add an assume that the index is inbounds to slice::get_unchecked #116915 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 2.5% [0.3%, 4.5%] 10
Regressions (secondary) 0.4% [0.3%, 0.6%] 3
Improvements (primary) -0.5% [-0.5%, -0.5%] 1
Improvements (secondary) - - 0
All (primary) 2.2% [-0.5%, 4.5%] 11
  • Still under investigation and perhaps a revert is called for

Improvements

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

Mixed

add track_caller for arith ops #114841 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.4%] 6
Regressions (secondary) 0.7% [0.2%, 1.3%] 12
Improvements (primary) - - 0
Improvements (secondary) -0.2% [-0.3%, -0.2%] 3
All (primary) 0.3% [0.2%, 0.4%] 6
  • Only really affecting rustdoc which is an acceptable tradeoff given the wins in diagnostics

Nominated Issues

T-compiler

  • No I-compiler-nominated issues this time.

RFC

  • No I-compiler-nominated RFCs this time.

Oldest PRs waiting for review

T-compiler

  • “resolve: re-export ambiguity as warning” rust#114682 (last review activity: about 55 days ago)
    • cc: vadim petrochenkov
  • “LLVM 18 x86 data layout update” rust#116672 (last review activity: about 49 days ago)
    • cc: @nikita Popov (will this be part of the next LLVM 18 upgrade?)
  • “WIP fix unsoundness via adjusting overlap check for some Pin impls” rust#116706 (last review activity: about 48 days ago)
    • cc: @Michael (compiler-errors) Goulet do you need a review at this time? Also from T-libs?
  • “discard invalid spans in external blocks” rust#116420 (last review activity: about 46 days ago)
    • cc: @nils (Nilstrieb)
  • “large_assignments: Lint on specific large args passed to functions” rust#116520 (last review activity: about 43 days ago)

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