T Compiler Meeting Agenda 2022 06 23

T-compiler Meeting Agenda 2022-06-23

Announcements

Other WG meetings (calendar link)

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
    • No new proposals this time.
  • Old MCPs (not seconded, take a look)
    • “Dealing with type/const ambiguities” compiler-team#480 (last review activity: 5 months ago)
    • “Removing codegen logic for nvptx-nvidia-cuda (32-bit target)” compiler-team#496 (last review activity: 3 months ago)
    • “Arbitrary annotations in compiletest” compiler-team#513 (last review activity: about 48 days ago)
    • “Add support for the LoongArch architecture” compiler-team#518 (last review activity: about 6 days ago)
  • Pending FCP requests (check your boxes!)
    • “Stabilize -Zgcc-ld=lld as -Clink-self-contained=linker -Clinker-flavor=gcc-lldcompiler-team#510
    • “Increase the minimum linux-gnu versions” rust#95026
    • “session: stabilize split debuginfo on linux” rust#98051
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
    • “Tier 3 target proposal: riscv64gc-linux-android (Android target for riscv64gc)” compiler-team#472
  • Finalized FCPs (disposition merge)
    • “Remove migrate borrowck mode” rust#95565
    • “Modify MIR building to drop repeat expressions with length zero” rust#95953
    • “Lang: Stabilize usage of rustc_nonnull_optimization_guaranteed on -1” rust#97122
    • “make cenum_impl_drop_cast deny-by-default” rust#97652
    • “lub: don’t bail out due to empty binders” rust#97867

WG checkins

@eddyb’s PR to support using hardware performance counters in -Zself-profile has landed! #78781

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “Remove the unused-#[doc(hidden)] logic from the unused_attributes lint” rust#98336
    • PR authored by @fmease
    • approved by @Michael Goulet (compiler-errors)
    • PR author mentions that this patch should be backported to fix #96890 (comment)
  • No stable nominations for T-compiler this time.

T-rustdoc stable / T-rustdoc beta

  • :beta: “Remove the unused-#[doc(hidden)] logic from the unused_attributes lint” rust#98336
    • See above nomination, T-rustdoc approves the backport (comment)
  • No stable nominations for T-rustdoc this time.

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • No PRs waiting on T-compiler this time.
    • (4 PRs omitted since either drafts or waiting on other teams / RFC process)

Oldest PRs waiting for review

T-compiler

  • “Add option to pass environment variables” rust#94387 (last review activity: about 33 days ago)
    • cc latest reviewers: @Esteban Küber and @bjorn3
  • “Add Finalize statement to make deaggregation “reversible” by storing all information in MIR” rust#96043 (last review activity: about 25 days ago)
    • unsure about status: maybe a comment on latest perf run results?
    • cc: @Wesley Wiser assigned reviewer
  • “Add round_ties_even to f32 and f64rust#95317 (last review activity: about 41 days ago)
    • r’ed by Felix comment
    • anything else from T-compiler?
  • “Mir-Opt for copying enums with large discrepancies” rust#85158 (last review activity: 3 months ago)
  • “Only compile #[used] as llvm.compiler.used for ELF targets” rust#93718 (last review activity: 2 months ago)

Issues of Note

Short Summary

P-critical

T-compiler

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

  • No unassigned P-high nightly regressions this time.

Performance logs

2022-06-21 Triage Log

A pretty busy week for performance, with quite a few PRs landing with significant improvements to specific benchmarks. Overall the week was positive, with many benchmarks improving at least a little. No significant changes in memory usage this week.

Triage done by @simulacrum. Revision range: edab34ab2abbafc16a78daedf71dbacd2eb0b7bf..abace0a1f17986d89aedf610819deab2b4afee56

Summary:

mean max count
Regressions (primary) 0.4% 0.5% 6
Regressions (secondary) 2.9% 14.7% 37
Improvements (primary) -1.9% -19.4% 89
Improvements (secondary) -8.4% -91.4% 38
All (primary) -1.8% -19.4% 95

5 Regressions, 6 Improvements, 3 Mixed; 1 of them in rollups 54 artifact comparisons made in total

Regressions

BTreeMap: Support custom allocators (v1.5) #98103 (Comparison Link)

mean max count
Regressions (primary) 1.7% 3.0% 2
Regressions (secondary) 1.6% 2.1% 6
Improvements (primary) N/A N/A 0
Improvements (secondary) N/A N/A 0
All (primary) 1.7% 3.0% 2

This regression is largely fixed by #98178.

Improve the tuple and unit trait docs #97842 (Comparison Link)

mean max count
Regressions (primary) 0.4% 0.6% 2
Regressions (secondary) 0.3% 0.4% 3
Improvements (primary) N/A N/A 0
Improvements (secondary) N/A N/A 0
All (primary) 0.4% 0.6% 2

Slight regressions to small number of doc benchmarks, likely due to slightly more work during generation (std’s docs changed).

Fix SourceScope for if let bindings. #97931 (Comparison Link)

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

Regression is pretty small and only one primary benchmark is affected (regex), and only incremental scenarios there. Likely not enough to worry about.

Obligation forest tweaks #97674 (Comparison Link)

mean max count
Regressions (primary) 0.8% 0.9% 2
Regressions (secondary) 1.8% 2.4% 7
Improvements (primary) N/A N/A 0
Improvements (secondary) -0.3% -0.3% 1
All (primary) 0.8% 0.9% 2

keccak is the primary affected benchmark, and is known to be very sensitive to changes to the obligation forest code. See some analysis in this comment following up on the results from the merge perf run.

Rollup of 4 pull requests #98307 (Comparison Link)

mean max count
Regressions (primary) 0.3% 0.3% 2
Regressions (secondary) 0.7% 0.8% 6
Improvements (primary) N/A N/A 0
Improvements (secondary) -0.4% -0.4% 1
All (primary) 0.3% 0.3% 2

Cause of regressions is unclear, but they’re minor enough that it’s not worth the hassle of investigating a rollup.

Improvements

ctfe: limit hashing of big const allocations when interning #98097 (Comparison Link)

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

Batch proc_macro RPC for TokenStream iteration and combination operations #98186 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -1.0% -4.0% 26
Improvements (secondary) -12.1% -37.5% 15
All (primary) -1.0% -4.0% 26

Fix MissingDoc quadratic behaviour #98153 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.3% -0.4% 14
Improvements (secondary) N/A N/A 0
All (primary) -0.3% -0.4% 14

Make some lints incremental. #98238 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.4% -1.7% 54
Improvements (secondary) -7.4% -90.8% 17
All (primary) -0.4% -1.7% 54

[RFC 2011] Expand expressions where possible #98148 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.3% -0.4% 2
Improvements (secondary) -0.7% -0.8% 6
All (primary) -0.3% -0.4% 2

Compile unicode-normalization faster #97936 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) 1.0% 1.0% 1
Improvements (primary) -14.2% -19.4% 6
Improvements (secondary) N/A N/A 0
All (primary) -14.2% -19.4% 6

A solid improvement, though just to the one benchmark; coercions change in the regressions section is likely just noise, not an actual meaningful delta.

Mixed

Use valtrees as the type-system representation for constant values #96591 (Comparison Link)

mean max count
Regressions (primary) 0.4% 0.6% 54
Regressions (secondary) 3.1% 14.3% 29
Improvements (primary) -3.0% -5.9% 10
Improvements (secondary) -1.1% -1.6% 7
All (primary) -0.2% -5.9% 64

Large change (over 2000 lines changed) that is a first step for further work on constant evaluation in the compiler. Overall this is still an improvement, and regressions are primarily on stress tests. See this comment for some further context.

Split up Definitions and ResolverAstLowering. #98106 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) 0.4% 0.5% 9
Improvements (primary) -0.3% -0.6% 39
Improvements (secondary) -0.3% -0.6% 5
All (primary) -0.3% -0.6% 39

btree: avoid forcing the allocator to be a reference #98178 (Comparison Link)

mean max count
Regressions (primary) 0.4% 0.4% 1
Regressions (secondary) N/A N/A 0
Improvements (primary) -2.0% -2.0% 1
Improvements (secondary) N/A N/A 0
All (primary) -0.8% -2.0% 2

Nominated Issues

T-compiler

  • “Update Mac Catalyst support for Clang 13” rust#96392
    • nominated by @Esteban Küber in comment to find someone more conversant with that platform
    • @_Thom Chiovoloni pinged a list of names that could help (comment)
  • “NLL: unsound verification of higher ranked outlives bounds” rust#98095
    • nominated by @Jack Huey, see P-critical

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-traits Generic associated types initiative by @Jack Huey
  • @_WG-diagnostics Diagnostics by @Esteban Küber and @oli