T Compiler Meeting Agenda 2024 12 05

T-compiler Meeting Agenda 2024-12-05

Announcements

  • The annual State of Rust survey has just been published (blog post): please share, boost, toot, tweet, and don’t forget to fill it up :-)
  • Tomorrow design meeting about type_id collisions (compiler-team#774) time:2024-12-06T09:00:00-06:00
  • 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!)
    • No new proposals this time.
  • 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: 2 months ago)
      • cc:‘ing @Vadim Petrochenkov @Esteban Küber @oli (in case they have comments)
    • “Add Hotpatch flag” compiler-team#745 (Zulip) (last review activity: about 53 days ago)
    • “Make the test cfg a userspace check-cfg” compiler-team#785 (Zulip) (last review activity: about 0 days ago)
      • bumping this one, few missing ticks: c @Wesley Wiser @pnkfelix @Esteban Küber @cjgillot
    • “Policy change around adding new unstable flags” compiler-team#787 (Zulip) (last review activity: about 46 days ago)
    • “Normalize FileCheck directives” compiler-team#789 (Zulip) (last review activity: about 46 days ago)
      • any opinion from the team?
    • “Relink, don’t rebuild” compiler-team#790 (Zulip) (last review activity: about 46 days ago)
    • “Create an avr-unknown-none target” compiler-team#800 (Zulip) (last review activity: about 24 days ago)
      • any opposing opinion or comment to this?
  • Pending FCP requests (check your boxes!)
    • “sanitizers: Stabilize AddressSanitizer and LeakSanitizer for the Tier 1 targets” rust#123617
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
  • MCPs blocked on unresolved concerns
  • Finalized FCPs (disposition merge)
    • “Add --print host-tuple to print host target tuple” rust#125579
    • “make unsupported_calling_conventions a hard error” rust#129935
    • “Fix ICE when passing DefId-creating args to legacy_const_generics.” rust#130443
    • “Stabilize WebAssembly multivalue, reference-types, and tail-call target features” rust#131080
  • Other teams finalized FCPs
    • “Add lint against function pointer comparisons” rust#118833
    • “Fixup Windows verbatim paths when used with the include! macro” rust#125205
    • “Allow dropping dyn Trait principal” rust#126660
    • “atomics: allow atomic and non-atomic reads to race” rust#128778
    • “Lint against getting pointers from immediately dropped temporaries” rust#128985
    • “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
    • “Finish stabilization of result_ffi_guaranteesrust#130628
    • “Stabilize const ptr::write* and mem::replacerust#130954
    • “Stabilize s390x inline assembly” rust#131258
    • “Stabilize Arm64EC inline assembly” rust#131781
    • “Stabilize #[diagnostic::do_not_recommend]rust#132056
    • “Make missing_abi lint warn-by-default.” rust#132397
    • “mark is_val_statically_known intrinsic as stably const-callable” rust#132449
    • “Stabilize async closures (RFC 3668)” rust#132706

WG checkins

None

Backport nominations

T-compiler beta / T-compiler stable

  • :beta: “Update LLVM to 19.1.5” rust#133799
    • Authored by DianQK
    • Fixes #133276 (miscompile specific to loongarch64 arch, tier 2 target) and #133203 (a more interesting invalid LLVM IR crashing rustc on stable)
  • 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

  • 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

  • No P-high beta regressions this time.

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2024-12-03

Busy week with more PRs impacting performance than is typical. Luckily performance improvements outweighed regressions in real world benchmarks with the largest single performance gain coming from a change to no longer unconditionally do LLVM IR verification in debug builds which was just wasted work.

Triage done by @rylev. Revision range: 7db7489f..490b2cc0

Summary:

(instructions:u)meanrangecount
Regressions (primary)0.5%[0.2%, 1.9%]58
Regressions (secondary)1.1%[0.2%, 5.1%]85
Improvements (primary)-2.3%[-8.2%, -0.2%]116
Improvements (secondary)-2.5%[-8.9%, -0.1%]55
All (primary)-1.4%[-8.2%, 1.9%]174

6 Regressions, 6 Improvements, 5 Mixed; 5 of them in rollups 49 artifact comparisons made in total

Regressions

Rollup of 5 pull requests #133551 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.2%, 1.6%]20
Regressions (secondary)2.4%[0.3%, 4.8%]22
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.4%[0.2%, 1.6%]20

Rollup of 12 pull requests #133561 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.2%[0.1%, 0.3%]3
Regressions (secondary)0.6%[0.2%, 0.9%]10
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.2%[0.1%, 0.3%]3
  • The regressions in the primary benchmarks reverted back to their previous mean after a few PRs so I don’t think this is necessarily worth looking further into.

Remove HybridBitSet #133431 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.2%[0.1%, 0.2%]6
Regressions (secondary)0.2%[0.1%, 0.3%]9
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.2%[0.1%, 0.2%]6
  • Post merge perf results are a bit different from the pre-merge run, but they look similar enough that this doesn’t require more investigation.

Rollup of 6 pull requests #133659 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.3%, 0.4%]2
Regressions (secondary)0.3%[0.3%, 0.3%]1
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.4%[0.3%, 0.4%]2
  • Perf regressions are small enough that I don’t think this requires investigation especially considering that one of the primary regressions returned to its previous state a bit later on.

Make compare_impl_item into a query #133365 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.3%[0.2%, 0.5%]27
Regressions (secondary)0.4%[0.3%, 1.3%]7
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.3%[0.2%, 0.5%]27
  • Perf regressions were excused here

fast-reject: add depth check #133566 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.5%[0.4%, 0.7%]13
Regressions (secondary)--0
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.5%[0.4%, 0.7%]13
  • “Only a small regression, multiple strategies were tried here and in other PRs to get to this result — and it’s a necessary hit.”

Improvements

Recover some lost performence from #132732 #133509 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-1.7%[-4.2%, -0.2%]8
Improvements (secondary)--0
All (primary)-1.7%[-4.2%, -0.2%]8

Respect verify-llvm-ir option in the backend #133499 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-2.3%[-8.1%, -0.2%]89
Improvements (secondary)-2.9%[-9.8%, -0.3%]41
All (primary)-2.3%[-8.1%, -0.2%]89

Stop cloning Context so much #133345 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-0.5%[-1.3%, -0.1%]5
Improvements (secondary)-0.8%[-0.8%, -0.8%]1
All (primary)-0.5%[-1.3%, -0.1%]5

check local cache even if global is usable #133626 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-2.5%[-3.1%, -1.8%]2
Improvements (secondary)-0.3%[-0.3%, -0.2%]2
All (primary)-2.5%[-3.1%, -1.8%]2

Get rid of HIR const checker #133321 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)0.2%[0.2%, 0.2%]1
Improvements (primary)-0.2%[-0.3%, -0.1%]12
Improvements (secondary)-0.2%[-0.4%, -0.1%]28
All (primary)-0.2%[-0.3%, -0.1%]12

switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0 #133792 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-0.1%[-0.3%, -0.1%]30
Improvements (secondary)-0.1%[-0.2%, -0.1%]8
All (primary)-0.1%[-0.3%, -0.1%]30

Mixed

Rollup of 12 pull requests #133505 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.7%[0.7%, 0.7%]1
Regressions (secondary)0.3%[0.2%, 0.4%]4
Improvements (primary)-0.2%[-0.2%, -0.1%]3
Improvements (secondary)-0.3%[-1.9%, -0.1%]19
All (primary)0.0%[-0.2%, 0.7%]4
  • The negative results are small enough (and reverted to their previous mean in a later PR) that this isn’t worth investigating.

Do not unify dereferences of shared borrows in GVN #133474 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.2%[0.1%, 0.6%]14
Regressions (secondary)0.2%[0.1%, 0.4%]10
Improvements (primary)-1.7%[-6.7%, -0.2%]9
Improvements (secondary)-0.2%[-0.3%, -0.1%]6
All (primary)-0.5%[-6.7%, 0.6%]23
  • “This fixes a miscompilation due to an unsound MIR optimization which is disabled in this PR.”

always create DefIds for anon consts #133468 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)4.2%[4.2%, 4.2%]1
Improvements (primary)-0.3%[-0.3%, -0.3%]1
Improvements (secondary)-0.6%[-1.0%, -0.3%]9
All (primary)-0.3%[-0.3%, -0.3%]1
  • “The coercions regression was noise and was fixed in the next merge”

Enable -Zshare-generics for inline(never) functions #123244 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.5%[0.1%, 5.5%]58
Regressions (secondary)0.6%[0.1%, 1.6%]84
Improvements (primary)-0.7%[-3.8%, -0.1%]44
Improvements (secondary)-1.6%[-8.0%, -0.2%]25
All (primary)-0.0%[-3.8%, 5.5%]102
  • “Regressions remain pretty similar to what we saw before (primarily in incremental it looks like?), and bootstrap times reflect the expectation that this significantly helps with larger crate graphs where there’s more opportunity for reuse. Binary size win is also pretty nice.” (more context here)

Rollup of 8 pull requests #133694 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.3%[0.1%, 0.7%]6
Regressions (secondary)0.5%[0.2%, 0.7%]19
Improvements (primary)--0
Improvements (secondary)-0.3%[-0.3%, -0.3%]1
All (primary)0.3%[0.1%, 0.7%]6
  • Most of the regressions are in doc-full scenarios, and I don’t see anything that is obviously a culprit.

Nominated Issues

T-compiler

RFC

  • No I-compiler-nominated RFCs this time.

Oldest PRs waiting for review

T-compiler

  • “Lint against &T to &mut T and &T to &UnsafeCell<T> transmutes” rust#128351
    • cc @Wesley Wiser I think this is ripe for merging
  • “Improve parse item fallback” rust#125388 (last review activity: 6 months ago)
    • any taker for this one? Seems a little stuck. (Which area of the compiler? Diagnostics?)
  • “When annotations needed, look at impls for more accurate suggestions” rust#128653 (last review activity: 3 months ago)
    • cc: @Michael Goulet (compiler-errors)
  • “Add diagnostics to “while loop” and “for loop” that note that it is always determined that it might iterate zero times.” rust#126510 (last review activity: 3 months ago)
    • cc @Esteban Küber
  • “Apply dllimport in ThinLTO” rust#122790 (last review activity: 3 months ago)
    • cc @Wesley Wiser
  • “coverage: Support match statements in branch coverage” rust#130744 (last review activity: 2 months ago)
    • cc: @Zalathar what do you think is the status here?
  • “Remove allowing static_mut_refs lint” rust#131439 (last review activity: about 57 days ago)
    • cc: @Michael Goulet (compiler-errors)
  • “sess: default to v0 symbol mangling” rust#89917
    • Is there anyone interested in picking this up?
    • Last status comment is here, probably still actual
  • “Stabilize target_feature_11” rust#116114
    • @RalfJ do you know the status from T-lang side? I think it was ok’ed comment, correct?

Next meetings’ agenda draft: hackmd link