T Compiler Meeting Agenda 2023 12 14

T-compiler Meeting Agenda 2023-12-14

Announcements

  • Compiler Team Planning meeting at time:2023-12-15T10:00:00-05:00
  • Google Summer of Code 2024: brainstorming ideas in (Zulip thread)
    • Do top teams have a wish for projects to be submitted?
    • Do top teams have capacity to mentor GSoC participants?
    • GSoC details at this link, time window for submissions Jan, 22nd 2024 until Feb. 6th, 2024
  • 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-types checkin by @Jack Huey (HackMD link):
    • We have automatic planning meeting agenda creation and stream opening!
      • triagebot#1739 and triagebot#1742
    • Lots of work done by Michael on extracting things into rustc_type_ir
      • Too many to list!
    • async fns in traits and RPITs in traits are stable in 1.75
      • Further work on e.g. RTN stalled on new trait solver
    • There is a plan to stabilize a TAIT MVP, many open lang questions being decided
    • RFC accepted for RPITs to capture all lifetimes
    • Trait upcasting to be stable in 1.76
    • Plan to stabilize a subset of negative impls
    • Lots of ongoing work to next trait solver
      • Tracked in types-team#105 and types-team#112
      • Plan is still to stabilize next trait solver in coherence first
    • Good progress on a location-insenstive Polonius-based borrow check in rustc

Backport nominations

T-compiler beta / T-compiler stable

  • :beta: “temporarily revert “ice on ambguity in mir typeck”” rust#118736
    • Reverts #116530 as a temporary measure to fix #117577 (P-medium regression, see comment)
  • No stable nominations for T-compiler this time.

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

T-types

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

P-high regressions

P-high beta regressions

  • No new P-high regressions

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2023-12-11

A quiet week overall. A few smaller crate (e.g., helloworld) benchmarks saw significant improvements in #118568, but this merely restores performance regressed earlier.

Triage done by @simulacrum. Revision range: 9358642..5701093

Summary:

(instructions:u)meanrangecount
Regressions (primary)0.5%[0.2%, 1.3%]111
Regressions (secondary)0.7%[0.1%, 1.5%]34
Improvements (primary)-5.2%[-11.1%, -0.5%]18
Improvements (secondary)-4.6%[-10.5%, -0.4%]72
All (primary)-0.3%[-11.1%, 1.3%]129

5 Regressions, 2 Improvements, 3 Mixed; 2 of them in rollups 69 artifact comparisons made in total

Regressions

compile-time evaluation: detect writes through immutable pointers #118324 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)0.9%[0.3%, 1.4%]12
Improvements (primary)--0
Improvements (secondary)--0
All (primary)--0

I feel like the remaining regression is small enough to be acceptable. We’re doing more checks in const-eval, and there are no regressions in the builds of real crates.

(https://github.com/rust-lang/rust/pull/118324#issuecomment-1832836626)

Introduce support for async gen blocks #118420 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.2%[0.1%, 0.3%]23
Regressions (secondary)0.4%[0.2%, 0.7%]3
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.2%[0.1%, 0.3%]23

New functionality costs some additional time across some benchmarks.

Rollup of 6 pull requests #118763 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.2%, 0.5%]18
Regressions (secondary)--0
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.4%[0.2%, 0.5%]18

We do a little bit more work after that PR because the reachable set is slightly bigger and that in turn means more MIR gets encoded and things like that.

(https://github.com/rust-lang/rust/pull/118763#issuecomment-1850073772)

Don’t warn an empty pattern unreachable if we’re not sure the data is valid #118308 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.6%[0.2%, 0.9%]4
Regressions (secondary)1.0%[1.0%, 1.0%]6
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.6%[0.2%, 0.9%]4

Yeah I expected a perf regression because of the validity tracking. It adds an extra step for every constructor we try, and match-stress has an enum with 8000 of these. I don’t think there’s a way around it, I need to know the validity of every inspected place.

(https://github.com/rust-lang/rust/pull/118308#issuecomment-1831103831)

This adds costs particularly to crates with lots or large matches, seen across a few primary workloads and within rustc bootstrap. This is a diagnostic correctness fix, so some cost is acceptable.

Restore const PartialEq #118661 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.3%[0.2%, 0.4%]9
Regressions (secondary)0.3%[0.2%, 0.6%]11
Improvements (primary)--0
Improvements (secondary)-0.8%[-0.8%, -0.8%]1
All (primary)0.3%[0.2%, 0.4%]9

Feature addition carrying likely unavoidable cost in some benchmarks.

Improvements

Avoid adding builtin functions to symbols.o #118568 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-6.6%[-11.0%, -0.7%]14
Improvements (secondary)-5.0%[-10.7%, -0.3%]66
All (primary)-6.6%[-11.0%, -0.7%]14

Smaller benchmarks show significant improvements, recovering a past performance regression. See PR description for details.

Rollup of 8 pull requests #118838 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)--0
Improvements (secondary)-0.9%[-1.0%, -0.9%]6
All (primary)--0

https://github.com/rust-lang/rust/pull/118822 is the likely cause, but not worth digging deeper on this improvement.

Mixed

split NormalizesTo out of Projection 3 #118725 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.2%, 0.9%]17
Regressions (secondary)0.3%[0.2%, 0.3%]3
Improvements (primary)-2.6%[-2.6%, -2.6%]1
Improvements (secondary)--0
All (primary)0.3%[-2.6%, 0.9%]18

Moving code around in hot area, with slightly different work being done. Seems to add some cost to a few primary benchmarks.

See details in https://github.com/rust-lang/rust/pull/118725#issuecomment-1847121861

never_patterns: Parse match arms with no body #118527 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.1%[0.1%, 0.1%]1
Regressions (secondary)--0
Improvements (primary)-0.9%[-1.0%, -0.8%]2
Improvements (secondary)--0
All (primary)-0.5%[-1.0%, 0.1%]3

Regression is justified by the extra work for this new feature.

Improve print_tts #114571 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.2%[0.2%, 0.2%]1
Regressions (secondary)0.8%[0.5%, 1.0%]8
Improvements (primary)--0
Improvements (secondary)-0.2%[-0.3%, -0.2%]2
All (primary)0.2%[0.2%, 0.2%]1

Regressions mostly limited to secondary benchmarks. Single primary regression is in incr-unchanged and is relatively small.

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

  • “Require type_map::stub callers to supply file information” rust#104342 (last review activity: 6 months ago)
    • cc @Wesley Wiser (would you prefer reassigning?)
  • “compiler: allow transmute of ZST arrays with generics” rust#114009 (last review activity: 4 months ago)
    • cc: @wesley wiser
  • “fix(parse): avoid panic when cfg wrapper by bracket under capture-cfg mode” rust#113056 (last review activity: 4 months ago)
    • cc: @aaron hill (still actively reviewing PRs?)
  • “Limit -C strip on MSVC” rust#115120 (last review activity: 3 months ago)
    • PR author reassigned review? comment
  • “Stabilize extended_varargs_abi_supportrust#116161 (last review activity: 2 months ago)
    • cc: @wesley wiser
  • “make soft_unstable show up in future breakage reports” rust#116274
    • FCP waiting on your checkboxes @esteban küber @wesley wiser @pnkfelix (comment) (apropos refreshing the FCP process)
  • “Create the previous dep graph index on a background thread” rust#116375 (last review activity: 2 months ago)
    • cc: cjgillot

Next week’s WG checkins

@T-compiler/meeting is the next meeting on Dec, 21st happening, correct?

  • @_WG-llvm by @nagisa and @Nikita Popov

Next meetings’ agenda draft: hackmd link