T Compiler Meeting Agenda 2024 10 10

T-compiler Meeting Agenda 2024-10-10

Announcements

  • Next week Rust 1.82 is out
  • 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

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (stale MCP might be closed as per MCP procedure)
    • None at this time
  • Old MCPs (not seconded, take a look)
    • “Add hygiene attributes to compile expanded source code” compiler-team#692 (Zulip) (last review activity: about 21 days ago)
    • “Add Hotpatch flag” compiler-team#745 (Zulip) (last review activity: about 9 days ago)
    • “Add evex512 target feature for AVX10” compiler-team#778 (Zulip) (last review activity: about 34 days ago)
  • Pending FCP requests (check your boxes!)
    • “sanitizers: Stabilize AddressSanitizer and LeakSanitizer for the Tier 1 targets” rust#123617
    • “Add --print host-triple to print host target triple” rust#125579
    • “make unsupported_calling_conventions a hard error” rust#129935
    • “Stabilize WebAssembly multivalue, reference-types, and tail-call target features” rust#131080
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
  • MCPs blocked on unresolved concerns
  • Finalized FCPs (disposition merge)
    • None
  • Other teams finalized FCPs
    • “Allow dropping dyn Trait principal” rust#126660
    • “atomics: allow atomic and non-atomic reads to race” rust#128778
    • “Do not consider match/let/ref of place that evaluates to ! to diverge, disallow coercions from them too” rust#129392
    • “Make deprecated_cfg_attr_crate_type_name a hard error” rust#129670
    • “Stabilize expr_2021 fragment specifier in all editions” rust#129972
    • “Check elaborated projections from dyn don’t mention unconstrained late bound lifetimes” rust#130367

WG checkins

None

Backport nominations

T-compiler beta / T-compiler stable

  • :beta:“Disable jump threading UnOp::Not for non-bool” rust#131201
    • Authored by compiler-errors
    • Fixes an unsoundness #131195 (-Zmir-opt-level=2 miscompiles) and maybe also #131419
    • assuming the issue reproduces on beta and stable since this patch is labelled with both backport requests (didn’t find a clear indication of that in #131195) cc @Michael Goulet (compiler-errors)
  • :beta:“Update LLVM submodule” rust#131448
    • Authored by DianQK
    • on target thumbv7em-none-eabihf (Tier 2 w/o host tools, see #131164), the defmt crate (supposedly widely used on that target) does not compile anymore.
    • But context seems to be a little less common that that (see comment on Zulip)
    • Patchset upstream is here, also contains a few other changes
    • This fix is still being worked on (some CI issues).
  • :stable:“Disable jump threading UnOp::Not for non-bool” rust#131201
    • Authored by compiler-errors
    • see above

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

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

T-types

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

P-high regressions

P-high beta regressions

  • “non-pub function no longer compiled in debug profile, causing link errors on thumbv7em-none-eabihf with defmt” rust#131164
    • See backport of #131448

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2024-10-08

One regression dominated this week (dealing with a correctness fix around type system caching that was deemed necessary), but it luckily did not produce large regressions in any benchmarks. Overall, performance still ended up relatively in the same place as the beginning of the week.

Triage done by @rylev. Revision range: c87004a1..e6c46db4

Summary:

(instructions:u) mean range count
Regressions (primary) 0.3% [0.1%, 1.0%] 63
Regressions (secondary) 1.1% [0.1%, 3.4%] 81
Improvements (primary) -0.5% [-3.0%, -0.1%] 19
Improvements (secondary) -0.5% [-1.5%, -0.1%] 46
All (primary) 0.1% [-3.0%, 1.0%] 82

2 Regressions, 3 Improvements, 7 Mixed; 3 of them in rollups 57 artifact comparisons made in total

Regressions

Rollup of 4 pull requests #131111 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.2% [0.2%, 0.2%] 4
Regressions (secondary) - - 0
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.2% [0.2%, 0.2%] 4

add caching to most type folders, rm region uniquification #130821 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.1%, 0.5%] 44
Regressions (secondary) 0.7% [0.2%, 2.1%] 44
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.3% [0.1%, 0.5%] 44
  • Perf regressions were seen before merge and deemed acceptable here.

Improvements

Update hashbrown to 0.15 and adjust some methods #131148 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.2% [-0.2%, -0.1%] 2
Improvements (secondary) -0.3% [-2.3%, -0.1%] 14
All (primary) -0.2% [-0.2%, -0.1%] 2

Make opaque types regular HIR nodes #129244 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.1% [0.1%, 0.1%] 2
Improvements (primary) -0.2% [-0.3%, -0.1%] 13
Improvements (secondary) -0.6% [-1.4%, -0.2%] 23
All (primary) -0.2% [-0.3%, -0.1%] 13

Rollup of 7 pull requests #131372 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.3% [-0.3%, -0.2%] 3
Improvements (secondary) -0.2% [-0.3%, -0.1%] 9
All (primary) -0.3% [-0.3%, -0.2%] 3

Mixed

rustdoc: rewrite stability inheritance as a doc pass #131076 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.5% [0.2%, 0.8%] 2
Regressions (secondary) 0.2% [0.1%, 0.2%] 7
Improvements (primary) -0.5% [-0.9%, -0.2%] 4
Improvements (secondary) -0.2% [-0.2%, -0.2%] 1
All (primary) -0.1% [-0.9%, 0.8%] 6
  • Documentation correctness fix, but the results are a wash anyway, especially on primary benchmarks.

Rollup of 5 pull requests #131098 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.3%] 5
Regressions (secondary) 0.2% [0.2%, 0.2%] 1
Improvements (primary) - - 0
Improvements (secondary) -0.3% [-0.3%, -0.2%] 6
All (primary) 0.3% [0.2%, 0.3%] 5
  • The regressions are small and largely a jump back to a previous baseline so I don’t think this merits investigation.

interpret: always enable write_immediate sanity checks #131006 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.5% [0.2%, 2.3%] 15
Improvements (primary) - - 0
Improvements (secondary) -2.0% [-2.0%, -2.0%] 1
All (primary) - - 0
  • The perf regressions were deemed acceptable here.

Handle librustdoc cases of rustc::potential_query_instability lint #131259 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.5% [0.2%, 1.4%] 9
Regressions (secondary) - - 0
Improvements (primary) - - 0
Improvements (secondary) -0.5% [-0.6%, -0.4%] 2
All (primary) 0.5% [0.2%, 1.4%] 9
  • 1% regression in exchange for a reproducible build improvement. If we want to claw it back, we need to iterate over hash maps less.

rustc_infer cleanups #131226 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.8% [0.4%, 1.0%] 8
Improvements (primary) -0.3% [-0.5%, -0.2%] 40
Improvements (secondary) -0.3% [-0.5%, -0.2%] 15
All (primary) -0.3% [-0.5%, -0.2%] 40
  • Perf improvements outweigh the regressions so marking this as triaged

Remove CombineFields #131343 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.2% [0.2%, 0.2%] 3
Regressions (secondary) 0.3% [0.2%, 0.3%] 3
Improvements (primary) - - 0
Improvements (secondary) -0.2% [-0.2%, -0.2%] 1
All (primary) 0.2% [0.2%, 0.2%] 3
  • Regressions were determined as acceptable here.

Add precondition checks to ptr::offset, ptr::add, ptr::sub #130251 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.4% [0.3%, 0.5%] 2
Improvements (primary) -3.2% [-3.2%, -3.2%] 1
Improvements (secondary) -0.2% [-0.2%, -0.2%] 1
All (primary) -3.2% [-3.2%, -3.2%] 1
  • Results are net neutral and not significant enough to worry about. Alternatively, the slowdown is justified by finding bugs in real code.

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

  • “add error message for c# style named arguments” rust#118733
    • cc: @Esteban Küber
  • “Fix bug where option_env! would return None when env var is present but not valid Unicode” rust#122670
    • cc: @_Michael Goulet (compiler-errors)
  • “Suggest cloning Arc moved into closure” rust#124595 (last review activity: 4 months ago)
    • cc: @pnkfelix
  • “Silence errors in expressions caused by bare traits in paths in 2021 edition” rust#125784
    • cc: @León Orell Liehr (fmease) but also author cc @Esteban Küber
    • this is pretty big diff and needs a rebase. I’m not sure about the best way to proceed

Next week’s WG checkins

None

Next meetings' agenda draft: hackmd link