T Compiler Meeting Agenda 2022 10 20

T-compiler Meeting Agenda 2022-10-20

Announcements

Other WG meetings

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
    • No new proposals this time.
  • Old MCPs (not seconded, take a look)
    • “Arbitrary annotations in compiletest” compiler-team#513 (last review activity: 5 months ago)
      • MCP candidate for closing? (seems to not receive any feedback)
    • “Add #[alias] attribute to allow symbol aliasing” compiler-team#526 (last review activity: 2 months ago)
    • “Use RangeInclusive in SpanData instead of lo/hi” compiler-team#534 (last review activity: about 54 days ago)
    • “Allow informational -Z flags on stable compiler” compiler-team#542 (last review activity: about 54 days ago)
    • " Promote i586-unknown-linux-gnu to Tier 2 with Host Tools " compiler-team#543 (last review activity: about 54 days ago)
    • “Lower baseline expectations for i686 unix-like targets” compiler-team#548 (last review activity: about 40 days ago)
    • “MCP: Flag to disable extended error info.” compiler-team#550 (last review activity: about 21 days ago)
    • “New Tier-3 target proposal: powerpc64-ibm-aix” compiler-team#553 (last review activity: about 40 days ago)
      • MCP author pinged for feedback
    • “configurable rustc timeout for compiletest tests” compiler-team#554 (last review activity: about 40 days ago)
    • “MCP: Raise UEFI Targets to Tier-2” compiler-team#555 (last review activity: about 40 days ago)
      • MCP author pinged for feedback
    • “Raise minimum supported macOS and iOS versions” compiler-team#556 (last review activity: about 40 days ago)
    • “Rustc Contributor Program Major Change Proposal” compiler-team#557 (last review activity: about 0 days ago)
    • “Introduce a #[rustc::*] tool attribute namespace and provide a stable #[rustc::on_unimplemented] attribute” compiler-team#560 (last review activity: about 0 days ago)
    • -Z instrument-xray option” compiler-team#561 (last review activity: about 0 days ago)
      • Has an implementation PR ready for review (rust#102963)
  • Pending FCP requests (check your boxes!)
    • “Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error” rust#84022
  • Things in FCP (make sure you’re good with it)
    • “Only apply ProceduralMasquerade hack to older versions of rentalrust#94063
  • Accepted MCPs
    • No new accepted proposals this time.
  • Finalized FCPs (disposition merge)
    • “Handle projections as uncovered types during coherence check” rust#100555
    • “Remove save-analysis.” rust#101841
    • “make const_err a hard error” rust#102091
    • “Elaborate supertrait bounds when triggering unused_must_use on impl Traitrust#102287
    • “make order_dependent_trait_objects show up in future-breakage reports” rust#102635

WG checkins

  • @_WG-async-foundations by @nikomatsakis and @tmandry (previous checkin):

    Checkin text

  • Generic Associated Types initiative by @Jack Huey (previous checkin):

    Checkin text

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “Ensure enum cast moves” rust#103016
    • Fixes #102389, a T-lang P-critical regression
    • also nominated for stable backport
  • :beta: “Do anonymous lifetimes remapping correctly for nested rpits” rust#103205
    • @Santiago Pastorino authored the fix, being reviewed by @cjgillot
    • fixes a P-critical stable regression #103141
    • also nominated for stable backport
  • :beta: “Fix TyKind::is_simple_pathrust#103176
    • PR authored by @nnethercote, fixes a P-high regression rust#103157
    • nominated by @apiraino after reading this user comment about a 1.64.1 release for this fix
    • (in retrospect I wonder if #103157 was more a P-critical)
    • also nominated for stable backport
  • :beta: “linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO” rust#103092
    • complements rust#100404
    • nominated by @Vadim Petrochenkov to fix the beta
    • PR open but approved by @Wesley Wiser
  • :beta: “Add eval hack in super_relate_consts back” rust#103279
    • authored by @Michael Goulet (compiler-errors), fixes #103242 and #103243 (both beta regressions emerged in crater runs, thus prioritized as P-critical)
    • being reviewed by @lcnr
  • :stable: “Ensure enum cast moves” rust#103016
  • :stable: “Fix TyKind::is_simple_pathrust#103176
  • :stable: “Do anonymous lifetimes remapping correctly for nested rpits” rust#103205

T-rustdoc stable / T-rustdoc beta

  • No beta nominations for T-rustdoc this time.
  • No stable nominations for T-rustdoc this time.

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • “Add -Z instrument-xray flag” rust#102963
    • Ready now for another review from T-compiler
    • MCP compiler-team#561 waiting to be seconded
  • 3 other hidden issues in progress or waiting on other teams

Oldest PRs waiting for review

T-compiler

  • “Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error” rust#84022 (last review activity: 18 months ago)
  • “Refactor metadata emission to avoid visiting HIR” rust#98867 (last review activity: 3 months ago)
    • cc @cjgillot (own PR anyway)
  • “Implement std::marker::Tuple, use it in extern "rust-call" and Fn-family traits” rust#99943 (last review activity: 2 months ago)
    • cc: @Jack Huey
  • “Remove box_free lang item” rust#100036 (last review activity: about 56 days ago)
    • ready for review of perf. results cc: @Wesley Wiser

Issues of Note

Short Summary

P-critical

T-compiler

  • “ld64.lld: error: too many personalities (4) for compact unwind to encode” rust#102754
  • “regression: associated consts cannot be referenced in patterns” rust#103242
  • “regression: trait bound not satisfied” rust#103243
  • “regression: attributes on expressions are experimental” rust#103244
    • bisection points to #100232
    • @cjgillot self-assigned

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

triage logs for 2022-10-18

Overall a fairly busy week, with many improvements and regressions, though the net result ends up being a small regression. Pretty busy week in terms of regressions in rollups as well, which unfortunately mostly were not followed up on prior to the report being put together, despite the relative ease of running perf against individual PRs now.

Triage done by @simulacrum. Revision range: 1e926f06528ecb2503f026e2fd53cb735d487b10..e0f8e60dddfecfc9093ee9d9f42557d8260c0355

Summary:

(instructions:u) mean range count
Regressions (primary) 1.7% [0.2%, 6.3%] 46
Regressions (secondary) 1.6% [0.3%, 5.4%] 46
Improvements (primary) -0.6% [-2.3%, -0.2%] 45
Improvements (secondary) -2.0% [-9.2%, -0.2%] 32
All (primary) 0.6% [-2.3%, 6.3%] 91

2 Regressions, 4 Improvements, 4 Mixed; 4 of them in rollups 47 artifact comparisons made in total

Regressions

Populate effective visibilities in ‘rustc_resolve’ #102026 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 1.1% [0.2%, 5.6%] 65
Regressions (secondary) 0.9% [0.2%, 3.7%] 32
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 1.1% [0.2%, 5.6%] 65

The compiler is doing more work after this PR, but haven’t yet narrowed in on a fix or exact cause for the regression. @petrochenkov expects that we probably ought to be able to reduce the impact.

Rollup of 7 pull requests #102915 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.6% [0.2%, 1.1%] 12
Regressions (secondary) - - 0
Improvements (primary) -0.7% [-0.9%, -0.6%] 6
Improvements (secondary) - - 0
All (primary) 0.2% [-0.9%, 1.1%] 18

The improvements here are in diesel, which is noise; the regressions look plausibly real. Queued an additional perf run for further investigation.

Improvements

Rollup of 11 pull requests #102926 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.2% [0.2%, 0.2%] 1
Improvements (primary) -0.4% [-1.0%, -0.2%] 20
Improvements (secondary) -0.5% [-0.6%, -0.3%] 7
All (primary) -0.4% [-1.0%, -0.2%] 20

This may not be as much of an improvement as it looks; the diesel-related changes are all spurious (we are seeing an uptick in noise there).

Remove TokenStreamBuilder #102692 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.5% [-0.6%, -0.3%] 4
Improvements (secondary) -4.1% [-9.5%, -1.2%] 9
All (primary) -0.5% [-0.6%, -0.3%] 4

remove type traversal for mir constants #102355 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.4% [-0.8%, -0.2%] 36
Improvements (secondary) -1.3% [-3.7%, -0.2%] 37
All (primary) -0.4% [-0.8%, -0.2%] 36

Rollup of 7 pull requests #103026 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.9% [0.7%, 1.1%] 6
Regressions (secondary) 0.4% [0.4%, 0.4%] 1
Improvements (primary) - - 0
Improvements (secondary) -0.5% [-1.5%, -0.3%] 7
All (primary) 0.9% [0.7%, 1.1%] 6

Regressions are essentially all in diesel, which are spurious.

Mixed

Rollup of 7 pull requests #102975 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.6% [0.2%, 1.0%] 19
Regressions (secondary) 1.3% [0.2%, 3.8%] 41
Improvements (primary) -0.9% [-1.7%, -0.4%] 14
Improvements (secondary) - - 0
All (primary) -0.0% [-1.7%, 1.0%] 33

Check hidden types in dead code #102700 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 1.2% [1.0%, 1.3%] 4
Improvements (primary) -0.3% [-0.4%, -0.2%] 13
Improvements (secondary) -0.6% [-0.7%, -0.5%] 4
All (primary) -0.3% [-0.4%, -0.2%] 13

Get rid of rustc_query_description! #102895 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.5%] 9
Regressions (secondary) 0.6% [0.3%, 0.8%] 5
Improvements (primary) - - 0
Improvements (secondary) -0.7% [-1.2%, -0.2%] 6
All (primary) 0.3% [0.2%, 0.5%] 9

Make overlapping_impls not generic #102931 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.5% [0.5%, 0.5%] 2
Improvements (primary) -1.6% [-2.3%, -1.1%] 7
Improvements (secondary) - - 0
All (primary) -1.6% [-2.3%, -1.1%] 7

Nominated Issues

T-compiler

  • “Massive performance regression between nightly-2022-08-12 and nightly-2022-08-13” rust#102952
    • issue reporter points out that LLVM upgrades sometimes causes substancial perf. regression in the wasmi WASM interpreter, also points to a previous case in rust#95409)
    • Instructions to reproduce
    • Suggests a possible idea for these regressions: “Due to missing guaranteed tail calls in Rust wasmi relies heavily on a non-guaranteed optimization for a loop-switch based interpreter hot path”
    • @The 8472|330154 add some context in comment
    • possibly P-high or above, should an upstream LLVM issue be reported?

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-diagnostics by @Esteban Küber and @oli
  • @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081