T Compiler Meeting Agenda 2022 12 08

T-compiler Meeting Agenda 2022-12-08

Announcements

Other WG meetings (calendar link)

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (not seconded, take a look)
    • “Add #[alias] attribute to allow symbol aliasing” compiler-team#526 (last review activity: 4 months ago)
    • “Use RangeInclusive in SpanData instead of lo/hi” compiler-team#534 (last review activity: 3 months ago)
    • “Promote i586-unknown-linux-gnu to Tier 2 with Host Tools” compiler-team#543 (last review activity: 3 months ago)
    • “Lower baseline expectations for i686 unix-like targets” compiler-team#548 (last review activity: 3 months ago)
    • “MCP: Flag to disable extended error info.” compiler-team#550 (last review activity: 2 months ago)
    • “configurable rustc timeout for compiletest tests” compiler-team#554 (last review activity: 3 months ago)
    • “Rustc Contributor Program Major Change Proposal” compiler-team#557 (last review activity: about 44 days ago)
    • “Introduce a #[rustc::*] tool attribute namespace and provide a stable #[rustc::on_unimplemented] attribute” compiler-team#560 (last review activity: about 50 days ago)
    • -Z instrument-xray option” compiler-team#561 (last review activity: about 50 days ago)
    • “New tier-3 targets for OpenHarmony” compiler-team#568 (last review activity: about 19 days ago)
  • Pending FCP requests (check your boxes!)
    • “Encode spans relative to the enclosing item – enable by default” rust#84762
      • just entered in final comment period
    • “Change bindings_with_variant_name to deny-by-default” rust#104154
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error” rust#84022
    • “Make Sized coinductive, again” rust#100386
    • “Handle projections as uncovered types during coherence check” rust#100555
    • “Elaborate supertrait obligations when deducing closure signatures” rust#101834
    • “make const_err a hard error” rust#102091
    • “make unaligned_reference a hard error” rust#102513
    • “make order_dependent_trait_objects show up in future-breakage reports” rust#102635
    • “Stabilize raw-dylib for non-x86” rust#102793
    • “Use token::Lit in ast::ExprKind::Lit.” rust#102944
    • “Remove drop order twist of && and || and make them associative” rust#103293
    • “Unreserve braced enum variants in value namespace” rust#103578
    • “Stabilize native library modifier verbatimrust#104360
    • “Expand a style-guide principle: readability in plain text” rust#104506

WG checkins

  • @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081 (previous checkin):

    Most notable changes

    • Remove TyS #1526
    • clarify subtree tool policy #1518
    • rewrite the section about regions in the trait solver #1508

    Most notable WIPs

    • Create a chapter for AST validation #1524
    • Add -Ztrack-diagnostics information #1506
    • Add sample CodeLLDB launch.json #1482
    • Add a review checklist and suggest reviews as a way to get started with the project #1463
    • rewrite bootstrapping stages #1458
    • Improve documentation of MIR queries & passes #1434
    • Document inert vs active attributes #1110
  • Impl Trait initiative by @oli:

    Type Alias Impl Trait is ready for stabilization. oli is writing up documentation of the feature in https://hackmd.io/tB3V8MP5S66zHIWTUdRvQw so that the lang team can make an informed decision on the stabilization.

Backport nominations

T-compiler stable / T-compiler beta

  • No beta nominations for T-compiler this time.
  • 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

  • “Encode spans relative to the enclosing item – enable by default” rust#84762
    • just entered in final comment period: can remove S-waiting-on-team?
  • (other hidden issues in progress or waiting on other teams, details here)

Oldest PRs waiting for review

T-compiler

  • “Fix variable debuginfo being optimized away at mir-opt-level=2 rust#103657 (last review activity: about 39 days ago)
    • cc @Wesley Wiser for a comment on latest perf. run (I think)
  • “Add support for SpanTrace capture in ICE reports” rust#103993 (last review activity: about 27 days ago)
    • cc @oli (unsure if all the prev. review comments are checked)
  • “fix: Unexpected trait bound not satisfied in HRTB and Associated Type” rust#103695 (last review activity: about 26 days ago)
    • cc @Jack Huey for a comment on latest perf. run
  • “TokenTreesReader now can find the correct mismatch delimiter pairs” rust#104012 (last review activity: about 24 days ago)
    • cc @Esteban Küber
  • “Fix incorrect span when using byte-escaped rbrace” rust#103828 (last review activity: about 23 days ago)
    • cc @cjgillot
  • “layout_of: T: Thin implies sizeof(&T) == sizeof(usize)rust#104376 (last review activity: about 21 days ago)
    • cc @Michael Goulet (compiler-errors) for the comment (I believe still pending). Other than that, does it need more work or can be reviewed/approved?

Issues of Note

Short Summary

P-critical

T-compiler

  • “ICE “no errors encountered even though delay_span_bug issued” in nightly 2022-11-20” rust#105009
    • @lcnr self-assigned and prepared patch #105455, reviewed+approved by ‘@Jack Huey (cc: the MIR group)
    • closed a few other duplicate reports (#105171, #105044, #103081)

T-rustdoc

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

P-high regressions

P-high beta regressions

  • (issue #102754 discussed: not a release blocker)

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2022-12-06

A mixed bag of a week. 2 of the 3 regressions are connected to changes to the query system that underlies incremental compilation. The third regression is still being investigated. For all three, the impact on cycle counts that are within our noise tolerance levels There were several small-ish improvements, though PR #104963 is worth calling out: a well-factored change to how we lower the AST into HIR that had a broad positive impact. One final note: the summary-opt max-rss seems to gone up by 1.5% over the past month (perf), via a gradual climb; just something to keep our eyes on going forward.

Triage done by @pnkfelix. Revision range: 8a09420a..9db224fc

Summary:

(instructions:u) mean range count
Regressions (primary) 0.6% [0.2%, 1.5%] 52
Regressions (secondary) 1.2% [0.2%, 5.6%] 80
Improvements (primary) -0.8% [-1.7%, -0.2%] 34
Improvements (secondary) -2.2% [-4.8%, -0.2%] 29
All (primary) 0.0% [-1.7%, 1.5%] 86

3 Regressions, 7 Improvements, 4 Mixed; 3 of them in rollups 50 artifact comparisons made in total 30 Untriaged Pull Requests

Regressions

Allow to feed a value in another query’s cache #104940 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.4%] 44
Regressions (secondary) 0.3% [0.2%, 0.4%] 12
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.3% [0.2%, 0.4%] 44
  • Many primary benchmarks regressed, but the regression is contained solely to incremental builds, and the magnitude is also well-contained.
  • oli-obk investigated and determined that the bulk of the regression is time spent in try_mark_previous_green and incremental_verify_ich calls.
  • The impact on cycle-counts (rather than instruction counts) was well within noise tolerance levels.
  • Therefore, marked as triaged.

Reduce macro usage for lints #104863 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.5% [0.2%, 1.4%] 116
Regressions (secondary) 0.9% [0.1%, 2.3%] 83
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.5% [0.2%, 1.4%] 116

feed resolver_for_lowering instead of storing it in a field #105220 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.2% [0.2%, 0.3%] 2
Regressions (secondary) 0.5% [0.1%, 0.8%] 15
Improvements (primary) - - 0
Improvements (secondary) -0.3% [-0.3%, -0.3%] 1
All (primary) 0.2% [0.2%, 0.3%] 2

Improvements

Also cache the stable hash of interned Predicates #94487 (Comparison Link)

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

Some initial normalization method changes #104905 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.9% [-1.0%, -0.8%] 2
Improvements (secondary) -2.2% [-2.8%, -0.3%] 7
All (primary) -0.9% [-1.0%, -0.8%] 2

Attribute cleanups #104861 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.2% [-0.2%, -0.1%] 3
Improvements (secondary) -0.7% [-0.9%, -0.5%] 6
All (primary) -0.2% [-0.2%, -0.1%] 3

rustc_ast_lowering: Stop lowering imports into multiple items #104963 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.6% [0.6%, 0.6%] 1
Improvements (primary) -0.5% [-1.2%, -0.3%] 54
Improvements (secondary) -4.2% [-5.4%, -2.0%] 13
All (primary) -0.5% [-1.2%, -0.3%] 54
  • Wow, I would not have expected this to have this significant of an impact.
  • bravo petrochenkov

Ensure query backtraces work for DefIds created after ast lowering #105133 (Comparison Link)

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

Rewrite LLVM’s archive writer in Rust #97485 (Comparison Link)

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

Cheaper dump_mir take two #105121 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.9% [0.9%, 0.9%] 1
Improvements (primary) -1.1% [-1.9%, -0.6%] 17
Improvements (secondary) -1.4% [-1.9%, -0.6%] 9
All (primary) -1.1% [-1.9%, -0.6%] 17

Mixed

Rollup of 9 pull requests #105017 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.9% [0.9%, 1.0%] 2
Regressions (secondary) 3.7% [2.2%, 5.6%] 12
Improvements (primary) -0.6% [-0.8%, -0.4%] 7
Improvements (secondary) -1.1% [-1.3%, -0.9%] 4
All (primary) -0.3% [-0.8%, 1.0%] 9

Rollup of 14 pull requests #105070 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.6% [0.4%, 0.9%] 7
Regressions (secondary) 0.3% [0.2%, 0.4%] 7
Improvements (primary) -0.9% [-1.0%, -0.8%] 2
Improvements (secondary) -2.1% [-2.7%, -1.4%] 8
All (primary) 0.3% [-1.0%, 0.9%] 9

Rollup of 5 pull requests #105080 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.9% [0.8%, 1.0%] 2
Regressions (secondary) 2.4% [2.1%, 2.8%] 6
Improvements (primary) -0.7% [-0.9%, -0.5%] 7
Improvements (secondary) - - 0
All (primary) -0.3% [-0.9%, 1.0%] 9

° lqd already marked as triaged

Disable top down MIR inlining #105119 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.4% [0.2%, 1.0%] 12
Regressions (secondary) 1.0% [0.2%, 2.1%] 15
Improvements (primary) -0.4% [-1.0%, -0.2%] 8
Improvements (secondary) -0.7% [-1.0%, -0.1%] 18
All (primary) 0.1% [-1.0%, 1.0%] 20

Nominated Issues

T-compiler

  • No nominated issues for T-compiler this time.

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-llvm by @nagisa and @Nikita Popov
  • Types team by @nikomatsakis and @Jack Huey