T Compiler Meeting Agenda 2022 09 29

T-compiler Meeting Agenda 2022-09-29

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: 4 months ago)
    • “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 33 days ago)
    • “Allow informational -Z flags on stable compiler” compiler-team#542 (last review activity: about 33 days ago)
    • " Promote i586-unknown-linux-gnu to Tier 2 with Host Tools " compiler-team#543 (last review activity: about 33 days ago)
    • “Lower baseline expectations for i686 unix-like targets” compiler-team#548 (last review activity: about 19 days ago)
    • “MCP: Flag to disable extended error info.” compiler-team#550 (last review activity: about 0 days ago)
    • “New Tier-3 target proposal: powerpc64-ibm-aix” compiler-team#553 (last review activity: about 19 days ago)
    • “configurable rustc timeout for compiletest tests” compiler-team#554 (last review activity: about 19 days ago)
    • “MCP: Raise UEFI Targets to Tier-2” compiler-team#555 (last review activity: about 19 days ago)
    • “Raise minimum supported macOS and iOS versions” compiler-team#556 (last review activity: about 19 days ago)
    • “Rustc Contributor Program Major Change Proposal” compiler-team#557 (last review activity: about 6 days ago)
  • Pending FCP requests (check your boxes!)
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
    • No new accepted proposals this time.
  • Finalized FCPs (disposition merge)
    • “Neither require nor imply lifetime bounds on opaque type for well formedness” rust#95474

WG checkins

  • @_WG-llvm by @nagisa and @Nikita Popov (previous checkin):

    Nikita Popov:

    • we’ve dropped support for the legacy pass manager in rust.
    • I have a pending patch for loop peeling (https://reviews.llvm.org/D134803) that I expect to fix quite a few optimization fails involving external iteration over iterator adapters (skip etc). Relevant issue #101814.
    • cuviper: I’m also working on stack probes – https://reviews.llvm.org/D134494 fixed the last blocker for inline-asm probes on x86, and #102328 turned on PowerPC and SystemZ.
  • Types team by @nikomatsakis and @Jack Huey (previous checkin):

    Continued work on various initiatives. Continued work on incremental trait solver improvements and smaller soundness fixes. RPIT refactor (https://github.com/rust-lang/rust/pull/101345) didn’t work and needs a re-think. Work has been started to (slowly!) introduce PredicateTy from a-mir-formality.

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “implied_bounds: deal with inference vars” rust#102016
    • Fixes rust#101951, a bad diagnostic regression now in 1.65
    • Nominated by Wesley
  • :beta: “Fix wrongly refactored Lift impl” rust#102088
    • Fixes a regression mentioned in this comment
    • Fix authored and nominated by Oli
  • :beta: “Fix a typo “pararmeter” in error message” rust#102119
    • Well, it fixes a typo
    • @Esteban Küber nominated for backporting
  • :beta: “Deny associated type bindings within associated type bindings” rust#102338
    • Fixes a regression rust#102335, now in beta (where GATs are stable)
    • Patch authored and nominated by @Michael Goulet (compiler-errors)
  • :beta: “Fix unwind drop glue for if-then scopes” rust#102394
  • No stable nominations for T-compiler this time.

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

  • “Only apply ProceduralMasquerade hack to older versions of rentalrust#94063
    • PR is I-compiler-nominated
  • 2 other hidden issue waiting on teams

Oldest PRs waiting for review

T-compiler

  • “Allow impl Fn() -> impl Trait in return position” rust#93582 (last review activity: about 41 days ago)
    • ping @nikomatsakis for another round of review
  • “Overhaul ThinVec usage” rust#100666 (last review activity: about 41 days ago)
    • soft-ping to @nnethercote for this (seems not intended yet for general review)
  • “Fix off-by-one error in X87DoubleExtended::from_bits” rust#100685 (last review activity: about 40 days ago)
    • @eddyb changes review assignment to @Wesley Wiser for licensing about the tests in this PR
  • “Track -Cprofile-use and -Cprofile-sample-use value by file hash, not file path” rust#100413 (last review activity: about 38 days ago)

Issues of Note

Short Summary

P-critical

T-compiler

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

T-rustdoc

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

P-high regressions

P-high beta regressions

Unassigned P-high nightly regressions

  • “Regression: false positive from unreachable_pub lint” rust#102352
    • affects also an external crate CI

Performance logs

triage logs for 2022-09-27

Overall a fairly quiet week in terms of new changes; the majority of the delta this week was due to reverting #101620, which was a regression noted in last week’s report.

Triage done by @simulacrum. Revision range: 8fd6d03e22fba2930ad377b87299de6a37076074..d9297d22ad9edc2b56f0dd8734c1187a0c88be69

Summary:

(instructions:u) mean range count
Regressions (primary) 5.6% [0.4%, 32.9%] 32
Regressions (secondary) 7.4% [0.7%, 25.3%] 22
Improvements (primary) -4.0% [-13.4%, -0.3%] 135
Improvements (secondary) -4.3% [-19.4%, -0.1%] 123
All (primary) -2.2% [-13.4%, 32.9%] 167

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

Regressions

a fn pointer doesn’t implement Fn/FnMut/FnOnce if its return type isn’t sized #100096 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 23.0% [21.3%, 25.2%] 6
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) - - 0

Perf regression is being investigated by @compiler-errors. No positive fix yet though; due to the reported regression (#102289) we are thinking that just reverting may be the better option. This is a soundness fix though so the perf regression may be OK, but further investigation is warranted.

Require #[const_trait] on Trait for impl const Trait #100982 (Comparison Link)

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

This regression was known prior to merging the PR, but the reviewer concluded that the small wall-clock delta wasn’t worth further investigation. Left a comment asking for a better justification of the regression.

Improvements

use partition_point instead of binary_search when looking up source lines #101999 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.3% [-0.7%, -0.2%] 62
Improvements (secondary) -0.6% [-1.6%, -0.2%] 41
All (primary) -0.3% [-0.7%, -0.2%] 62

Rollup of 10 pull requests #102150 (Comparison Link)

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

Use internal iteration in Iterator comparison methods #100845 (Comparison Link)

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

Move DepKindStruct from rustc_middle to rustc_query_system #101710 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.5% [-0.9%, -0.2%] 66
Improvements (secondary) -0.4% [-0.7%, -0.2%] 18
All (primary) -0.5% [-0.9%, -0.2%] 66

Rollup of 5 pull requests #102297 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.7% [-0.7%, -0.7%] 1
Improvements (secondary) -1.3% [-1.5%, -1.2%] 6
All (primary) -0.7% [-0.7%, -0.7%] 1

Fix lint scoping for let-else. #102257 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.7% [-0.7%, -0.7%] 1
Improvements (secondary) -1.4% [-1.6%, -1.2%] 6
All (primary) -0.7% [-0.7%, -0.7%] 1

Improve code example for Option::unwrap_or_default #102283 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.7% [-0.7%, -0.7%] 1
Improvements (secondary) -1.3% [-1.6%, -1.2%] 6
All (primary) -0.7% [-0.7%, -0.7%] 1

Mixed

Revert perf-regression 101620 #102064 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 5.6% [0.3%, 33.5%] 33
Regressions (secondary) 1.1% [0.3%, 1.5%] 11
Improvements (primary) -3.7% [-12.3%, -0.3%] 129
Improvements (secondary) -4.1% [-19.0%, -0.2%] 121
All (primary) -1.8% [-12.3%, 33.5%] 162

This fixes a perf regression from last week and the overall trend is an improvement, so as expected.

Use function pointers instead of macro-unrolled loops in rustc_query_impl #101785 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 1.2% [1.2%, 1.2%] 2
Improvements (primary) -0.4% [-0.4%, -0.4%] 1
Improvements (secondary) -1.1% [-1.5%, -0.6%] 9
All (primary) -0.4% [-0.4%, -0.4%] 1

Overall mixed results and generally a slight improvement. The seemingly more important goal of reducing bootstrap times isn’t really achieved by this PR though it may help future iteration on these functions by avoiding some LLVM sensitivity.

Rollup of 5 pull requests #102324 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.7% [0.7%, 0.7%] 1
Regressions (secondary) 1.4% [1.3%, 1.6%] 6
Improvements (primary) -0.7% [-0.9%, -0.6%] 6
Improvements (secondary) - - 0
All (primary) -0.5% [-0.9%, 0.7%] 7

keccak, the primary regression, is within its suspected noise level bar.

Nominated Issues

T-compiler

  • “Only apply ProceduralMasquerade hack to older versions of rentalrust#94063
    • nominated by @aaron1011, asking for a opinion on the latest changes -> comment

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-mir-opt MIR Optimizations by @oli
  • @_WG-polymorphization Polymorphization by @davidtwco