T Compiler Meeting Agenda 2022 10 27

T-compiler Meeting Agenda 2022-10-27

Announcements

Other WG meetings

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (not seconded, take a look)
    • “Arbitrary annotations in compiletest” compiler-team#513 (last review activity: 5 months ago)
    • “Add #[alias] attribute to allow symbol aliasing” compiler-team#526 (last review activity: 3 months ago)
    • “Use RangeInclusive in SpanData instead of lo/hi” compiler-team#534 (last review activity: 2 months ago)
    • “Promote i586-unknown-linux-gnu to Tier 2 with Host Tools” compiler-team#543 (last review activity: 2 months ago)
    • “Lower baseline expectations for i686 unix-like targets” compiler-team#548 (last review activity: about 47 days ago)
    • “MCP: Flag to disable extended error info.” compiler-team#550 (last review activity: about 28 days ago)
    • “configurable rustc timeout for compiletest tests” compiler-team#554 (last review activity: about 47 days ago)
    • “Raise minimum supported macOS and iOS versions” compiler-team#556 (last review activity: about 47 days ago)
    • “Rustc Contributor Program Major Change Proposal” compiler-team#557 (last review activity: about 1 days ago)
    • “Introduce a #[rustc::*] tool attribute namespace and provide a stable #[rustc::on_unimplemented] attribute” compiler-team#560 (last review activity: about 7 days ago)
    • -Z instrument-xray option” compiler-team#561 (last review activity: about 7 days ago)
  • Pending FCP requests (check your boxes!)
    • No pending FCP requests this time.
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
    • No new accepted proposals this time.
  • Finalized FCPs (disposition merge)
    • “Only apply ProceduralMasquerade hack to older versions of rentalrust#94063
    • “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 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

WG checkins

  • @_WG-diagnostics by @Esteban Küber and @oli (previous checkin):

    • More and more diagnostics are getting ported to the struct-based scheme
    • Some improvements in greppability of translation slugs (diagnostic identifiers)
  • @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081 (previous checkin):

    Most notable changes

    • Update traits/resolution.md #1494
    • Update rust-analyzer suggestions #1487

    Most notable WIPs

    • Update outdated queries section #1483
    • 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
    • Added detail to codegen section #1216
    • Update build instructions for rustdoc #1117
    • Document inert vs active attributes #1110

Backport nominations

T-compiler beta / T-compiler stable

  • :beta: “Support raw-dylib functions being used inside inlined functions” rust#102988
    • backport suggested by @Chris Denton in comment (as raw-dylib is stabilized in 1.65)
  • :beta: “Add architectures to fn create_object_file” rust#103240
    • Fixes #102290 a P-medium on Tier3 platform
    • nominated by @Vadim Petrochenkov in comment
  • :beta: “Workaround unstable stmt_expr_attributes for method receiver expressions” rust#103430
    • nominated by @cjgillot, fixes #103244, P-critical crater run regressions
  • No stable nominations for T-compiler this time.

T-rustdoc beta / T-rustdoc stable

  • No backport nominations for T-rustdoc this time.

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • 4 hidden issues in progress or waiting on other teams

Oldest PRs waiting for review

T-compiler

  • “fix(generic_const_exprs): Fix predicate inheritance for children of opaque types” rust#99801 (last review activity: 2 months ago)
    • cc: @oli actual status of PR? waiting on review?
  • “Fix implied outlives bounds logic for projections” rust#101680 (last review activity: about 44 days ago)
    • unsure about the status: waiting on review from @nikomatsakis?
    • cc @Esteban Küber for this comment
  • “More distinctive pretty-printing of function item types” rust#99927 (last review activity: about 40 days ago)
    • After reading this comment, was a meeting proposal formalized? cc @Esteban Küber / @pnkfelix
  • “Recover wrong-cased keywords that start items” rust#99918 (last review activity: about 39 days ago)
    • cc @Esteban Küber

Issues of Note

Short Summary

P-critical

T-compiler

  • “ld64.lld: error: too many personalities (4) for compact unwind to encode” rust#102754
    • LLD bug will be fixed by llvm#D135728, (now merged)
    • A (comment) says that the LLD fix would not help, suggests that an additional rustc fix is needed
    • note: I assume the above commenter is referring to “us” as in “Brave browser developers” (by looking at their github profile), so unrelated to the issue reporter (Firefox)
  • “Rust update from 1.63 to 1.64 introduce lifetime problem on build” rust#103141
    • fixed by #103205, it’s open to track beta+stable backports
  • “regression: associated consts cannot be referenced in patterns” rust#103242
  • “regression: trait bound not satisfied” rust#103243
  • “function lifetime elision changed in 1.64” rust#103330
    • @simulacrum reports from T-lang that this should be reverted but given that the 1.64 is almost out, the fix will probably slip to 1.65

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-26

An amazing week. We saw more wins than losses; I want to call out specifically the wins from removing attributes from metadata (up to 8.2% faster builds for 18 benchmarks) and from enabling LTO for rustc_driver.so (up to 9.6% faster builds for an epic 230 benchmarks, with zero regressions).

Triage done by @pnkfelix. Revision range: e0f8e60d..629a414d

Summary:

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.7% [0.7%, 0.7%] 2
Improvements (primary) -4.3% [-9.4%, -0.4%] 231
Improvements (secondary) -4.4% [-9.5%, -0.5%] 256
All (primary) -4.3% [-9.4%, -0.4%] 231

2 Regressions, 6 Improvements, 2 Mixed; 2 of them in rollups 30 Untriaged Pull Requests 53 artifact comparisons made in total

Regressions

Add default trait implementations for “c-unwind” ABI function pointers #101263 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.9% [0.2%, 2.6%] 19
Regressions (secondary) 1.9% [0.4%, 3.0%] 23
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.9% [0.2%, 2.6%] 19
  • already triaged; all doc perf regressions, and already deemed acceptable.

Rollup of 10 pull requests #103562 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.4%] 43
Regressions (secondary) 0.5% [0.2%, 1.2%] 25
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.3% [0.2%, 0.4%] 43
  • all of the primary regressions (which seem small) are all in incr-patched scenarios. Most are also check builds, though there is some debug and opt mixed in as well.
  • hard to tell from the list of rolled up PR’s which one(s) would be to blame here
  • w.r.t. the secondary benchmarks, the main contributor (in terms of the max regression observed) is deeply-nested-multi, which regressed by 0.74–1.2% depending on the scenario.
    • (In this case, the 1.2% regression is to a full build, not an incremental one.)
  • In any case, the sheer number of impacted benchmarks is large enough that this warrants further review. Not marking as triaged. I’ll try to dig into it later.

Improvements

Use Set instead of Vec in transitive_relation #103214 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.6% [-0.7%, -0.6%] 2
Improvements (secondary) -1.2% [-1.6%, -0.6%] 7
All (primary) -0.6% [-0.7%, -0.6%] 2
  • as noted in PR description: “doesn’t fix the underlying quadraticness but it makes it a lot faster to an extent where even doubling the amount of nested references still takes less than two seconds (50s on nightly).”

Remove more attributes from metadata #98450 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.3% [0.3%, 0.3%] 1
Improvements (primary) -2.7% [-8.2%, -0.2%] 18
Improvements (secondary) -5.5% [-8.4%, -0.8%] 23
All (primary) -2.7% [-8.2%, -0.2%] 18
  • This PR’s comment+development history are pretty epic. :smile:
  • anyway, great work from @lqd and @GuillaumeGomez

stop using ty::UnevaluatedConst directly #103227 (Comparison Link)

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

Enable LTO for rustc_driver.so #101403 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -4.2% [-9.6%, -0.4%] 230
Improvements (secondary) -4.0% [-9.5%, -0.4%] 257
All (primary) -4.2% [-9.6%, -0.4%] 230
  • Holy cow: 9.6% faster compiling diesel, 7% faster compiling serde, 1.3% faster bootstrap. Epic wins there.
  • there is perhaps concern that it caused #103538: “rustc-dev component recently became a lot bigger”

Rollup of 11 pull requests #103502 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 2.3% [2.3%, 2.3%] 1
Improvements (primary) -0.5% [-0.5%, -0.5%] 1
Improvements (secondary) -0.9% [-1.2%, -0.8%] 6
All (primary) -0.5% [-0.5%, -0.5%] 1

Perf improvements for effective visibility calculating #103158 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.4% [-0.5%, -0.3%] 6
Improvements (secondary) -0.6% [-2.0%, -0.2%] 22
All (primary) -0.4% [-0.5%, -0.3%] 6
  • libc build times improved by ~1% in ten scenarios

Mixed

Deny hashing ty/re/ct inference variables #103220 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.8% [0.5%, 1.2%] 8
Improvements (primary) -0.2% [-0.3%, -0.2%] 2
Improvements (secondary) -0.9% [-1.0%, -0.5%] 9
All (primary) -0.2% [-0.3%, -0.2%] 2
  • already triaged: “The perf changes are small and the wins balance out the losses. No need to stress on this one, I think.”

Remove ParamEnv from uninhabited query #102660 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 1.5% [1.2%, 1.7%] 7
Improvements (primary) -0.2% [-0.2%, -0.2%] 2
Improvements (secondary) -1.2% [-1.2%, -1.2%] 3
All (primary) -0.2% [-0.2%, -0.2%] 2
  • Not sure why this was flagged as Mixed rather than Improvement.
  • Marked as triaged.

Nags requiring follow up

None

Nominated Issues

T-compiler

  • “libcompiler-builtins contains DWARF5 debuginfo in 1.62.0” rust#98746
    • Nominated by Felix, this slipped prioritization and went unnoticed (I assume because not labelled as a regression)
  • “Remove save-analysis.” rust#101841
    • Nominated by Wesley to decide when landing this (comment) and allow other tooling to migrate to rust-analyzer Zulip discussion
    • and also how to give proper notice (@nnethercote comment)

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

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