T Compiler Meeting Agenda 2024 04 11

T-compiler Meeting Agenda 2024-04-11

Announcements

  • Release of Rust stable 1.77.2 (blog post) (fixes the CVE on Windows platforms that is around now: args parsing for Windows scripts)
  • 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 by @Lukas Wirth (last checkin):

    Checkin text

Backport nominations

T-compiler beta / T-compiler stable

  • :beta: [1.78] “fix attribute validation on associated items in traits” rust#121545
    • Merged. Fixes #121537 (ICE on AST lowering)
    • Should also fix #123287, @_pnkfelix is investigating (comment)
  • :beta: [1.78] “Only inspect user-written predicates for privacy concerns” rust#123377
    • merged. Fixes #123288, P-high regression in latest crater run
  • :beta: [1.78] “Check def id before calling match_projection_projectionsrust#123471
    • merged. Fixes #123448, compilation started looping forever (comment about the fix)
  • :beta: [1.78] “Update to LLVM 18.1.3” rust#123555
    • merged. backports an LLVM patch. Fixes #122805 (p-medium codegen regression)
  • :beta: [1.78] “Restore pred_known_to_hold_modulo_regionsrust#123578
    • merged. Fixes #123275 (regression from crater run)
  • :beta: [1.78] “Properly handle emojis as literal prefix in macros” rust#123752
    • Fixes #123696, old stable-to-stable regression, nice but not a vital backport (see comment)
    • Not merged, waiting for a crater run
  • 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

  • “regression: unwrap on None in ast lowering” rust#123287
    • could be fixed by #121545 (see comment, @pnkfelix thanks!)

T-types

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

P-high regressions

P-high beta regressions

  • “regression: ICE failed to get output type of async function” rust#123273
    • under @Michael Goulet (compiler-errors) eyes
  • “regression: unexpected unsized tail ICE” rust#123275
    • Fixed by #123578
  • “regression: trait bound is not satisfied” rust#123279
    • will be closed by #123302 (merged and beta accepted)
  • “regression: f16 + f128 is unstable” rust#123282
    • Will be fixed by #123466 (merged straight into beta with a few other patches)

Unassigned P-high nightly regressions

  • “nightly-2024-04-05 regression: error[E0275]: overflow evaluating the requirement” rust#123573
    • reported by a project using Bevy and by the Diesel maintainer
    • seems the new solver could help here. See comment and PR #123594 (in FCP)

Performance logs

triage logs for 2024-04-11

A quiet week; all the outright regressions were already triaged (the one biggish one was #122077, which is justified as an important bug fix). There was a very nice set of improvements from PR #122070, which cleverly avoids a lot of unnecessary allocator calls when building an incremental dep graph by reusing the old edges from the previous graph.

Triage done by @pnkfelix. Revision range: 3d5528c2..86b603cd

Summary:

(instructions:u)meanrangecount
Regressions (primary)2.0%[0.4%, 5.0%]83
Regressions (secondary)2.1%[0.5%, 4.8%]79
Improvements (primary)-1.5%[-2.9%, -0.3%]121
Improvements (secondary)-1.4%[-3.5%, -0.3%]67
All (primary)-0.1%[-2.9%, 5.0%]204

3 Regressions, 3 Improvements, 7 Mixed; 1 of them in rollups 78 artifact comparisons made in total

Regressions

instantiate higher ranked goals outside of candidate selection #119820 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.6%[0.3%, 0.8%]8
Regressions (secondary)--0
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.6%[0.3%, 0.8%]8
  • already triaged by Jakub as an expected small performance regresison

Pass list of defineable opaque types into canonical queries #122077 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)1.9%[0.2%, 5.4%]101
Regressions (secondary)2.3%[0.3%, 4.7%]77

| Improvements (secondary) | - | - | 0 | | All (primary) | 1.8% | [-0.6%, 5.4%] | 102 |

  • already triaged by oli, as an expected performance regression that is justified as an important bugfix

Replace some CrateStore trait methods with hooks. #123099 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.3%[0.2%, 0.4%]14
Regressions (secondary)0.3%[0.3%, 0.4%]2
Improvements (primary)--0
Improvements (secondary)--0
All (primary)0.3%[0.2%, 0.4%]14
  • already triaged by oli, categorized as noise.

Improvements

hir: Drop owner’s own item-local id (zero) from parenting tables #123415 (Comparison Link)

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

[perf] cache type info for ParamEnv #123058 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)--0
Improvements (primary)-0.9%[-4.9%, -0.2%]47
Improvements (secondary)--0
All (primary)-0.9%[-4.9%, -0.2%]47

Remove debuginfo from rustc-demangle too #123608 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)0.6%[0.4%, 0.9%]4
Improvements (primary)-1.6%[-2.7%, -0.3%]7
Improvements (secondary)-1.3%[-2.4%, -0.3%]24
All (primary)-1.6%[-2.7%, -0.3%]7

Mixed

Add Ord::cmp for primitives as a BinOp in MIR #118310 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.2%, 0.7%]3
Regressions (secondary)0.3%[0.2%, 0.4%]2
Improvements (primary)-0.6%[-0.6%, -0.6%]1
Improvements (secondary)-3.1%[-3.1%, -3.1%]1
All (primary)0.2%[-0.6%, 0.7%]4
  • The impact here is somewhat limited, and the graph indicates that the 0.69% instruction-count regression for image-0.24.1 was subsequently recovered.

Encode dep graph edges directly from the previous graph when promoting #122070 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)--0
Regressions (secondary)0.4%[0.4%, 0.4%]1
Improvements (primary)-1.6%[-3.1%, -0.2%]113
Improvements (secondary)-1.5%[-3.6%, -0.3%]37
All (primary)-1.6%[-3.1%, -0.2%]113
  • already marked as triaged by Jakub

Implement T-types suggested logic for perfect non-local impl detection #122747 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)2.3%[0.6%, 4.4%]12
Regressions (secondary)--0
Improvements (primary)-0.3%[-0.4%, -0.2%]9
Improvements (secondary)--0
All (primary)1.2%[-0.4%, 4.4%]21
  • already marked as triaged by Urgau, with the comment “The perf regressions in diesel are due to the lint being triggered and producing nearly 300 warnings (with 155 actually shown)”
  • (This reminds me of rustc-perf#1819)

Remove sharding for VecCache #123556 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.4%, 0.4%]1
Regressions (secondary)0.5%[0.2%, 1.0%]5
Improvements (primary)--0
Improvements (secondary)-0.9%[-1.1%, -0.7%]4
All (primary)0.4%[0.4%, 0.4%]1
  • already marked as triaged by simulacrum, presumably because this is likely noise since it is “just” removing the sharded type whose feature was not in use.

Use unchecked_sub in str indexing #123561 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.9%[0.9%, 0.9%]1
Regressions (secondary)--0
Improvements (primary)--0
Improvements (secondary)-0.5%[-0.9%, -0.4%]7
All (primary)0.9%[0.9%, 0.9%]1
  • this is an improvement to the code for str::get_unchecked when overflow checks are enabled; its calling a compiler-intrinsic directly now.
  • it really doesn’t make any sense that it caused any regression at all. (Perhaps this change is causing a change to inlining decisions, at least for cargo?)
  • marking as triaged.

Rollup of 9 pull requests #123645 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.6%[0.6%, 0.6%]1
Regressions (secondary)--0
Improvements (primary)-0.3%[-0.4%, -0.3%]2
Improvements (secondary)-1.8%[-1.8%, -1.8%]1
All (primary)-0.0%[-0.4%, 0.6%]3
  • Looks like a temporary spike. Marking as triaged.

Only collect mono items from reachable blocks #123272 (Comparison Link)

(instructions:u)meanrangecount
Regressions (primary)0.4%[0.2%, 1.5%]8
Regressions (secondary)--0
Improvements (primary)-0.8%[-1.5%, -0.3%]6
Improvements (secondary)--0
All (primary)-0.1%[-1.5%, 1.5%]14
  • fixed an important bug.
  • from the comment history, it looks like the minor restricted regressions were anticipated.
  • marking as triaged.

Nominated Issues

T-compiler

  • “Fallout from expansion of redundant import checking” rust#121708
    • Fallout from #117772, added some linting improving use import redundancy.
    • Nominated for T-lang and T-compiler by @Josh Triplett see comment
    • change is already on beta, but it has some impact, so in the meanwhile it will reverted (comment)
  • “Consider using llvm-striprust#123151
    • proposal advanced by @_Jubilee, there’s also a Zulip discussion

      on various systems, we are encountering reports of people having inadequately-built strip binaries in their PATH that cannot support all Rust compiler use-cases (…) llvm-strip gets everything right, as far as we are concerned

  • “regression: compiler had non-unwinding abort” rust#123286
    • this is a beta crater run regression. Actually we fixed a UB (comment): “People were executing UB, we now prevent that and try to tell them about it”
    • @Ben Kimock (Saethlin) suggests a possible quick fix for a beta backport (comment)

RFC

  • No I-compiler-nominated RFCs this time.

Oldest PRs waiting for review

T-compiler

  • “Issue 83060 fix” rust#119798 (last review activity: 3 months ago)
    • cc @Wesley Wiser
  • “Small improvements to internal documentation” rust#120388
    • cc: @Esteban Küber
  • “Suggest a borrow when using dbg” rust#120990 (last review activity: about 58 days ago)
    • cc: @Esteban Küber
  • “Always emit native-static-libs note, even if it is empty” rust#121216 (last review activity: about 54 days ago)
    • cc @Wesley Wiser CI fails and author asked for input. Can you help there? thanks

Next week’s WG checkins

  • Impl Trait initiative by @oli
  • @_WG-llvm by @nagisa and @Nikita Popov

Next meetings’ agenda draft: hackmd link