T Compiler Meeting Agenda 2021 10 21

T-compiler Meeting Agenda 2021-10-21

Tracking Issue

Announcements

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
    • No new proposals this time.
  • Old MCPs (not seconded, take a look)
    • “rustdoc is using rustc_ast_pretty, would it be possible to make it somewhat “stable”?” compiler-team#403 (last review activity: GH none, Zulip +3 months ago)
    • “CI should exercise (subset of) tests under –stage 1” compiler-team#439 (last review activity: GH none, Zulip about 1 week ago)
    • “Accept pc in place of unknown and unknown in place of pc for x86_64 and i?86 targets” compiler-team#441 (last review activity: 3 months ago)
    • “Make -Z binary-dep-depinfo the default behavior” compiler-team#464 (last review activity: GH none, Zulip about 1 month ago)
  • Pending FCP requests (check your boxes!)
    • “Write text output files to stdout if options like -o - or --emit asm=- are provided” compiler-team#431
    • “Tracking issue for #![feature(const_precise_live_drops)]rust#73255
  • Things in FCP (make sure you’re good with it)
    • “Tier 3 target proposal: x86_64-unknown-none (freestanding/bare-metal x86-64)” compiler-team#462
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Make all proc-macro back-compat lints deny-by-default” rust#88041
    • “Stabilize unreachable_unchecked as const fnrust#89509

WG checkins

@wg-incr-comp by @pnkfelix and @Wesley Wiser (previous checkin):

pnkfelix thinks there is nothing to report since the last checkin

@WG-llvm by @nagisa (previous checkin):

A PR that’s about to land (if it hasn’t yet) to drop LLVM 10 support (last time I wrote an update we only “considered” it^^) NewPM did land. NewPM has led to some problems with build times and memory use due to different (and worse?) inlining and unrolling heuristics in some samples of code, but on average the build times did decrease significantly.

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “Revert #86011 to fix an incorrect bound check” rust#90025
  • :beta: “Erase late-bound regions before computing vtable debuginfo name.” rust#90050
    • fixes stable-to-beta P-critical rust#90019
    • nominated by @mw as it fixes a stable-to-beta regression
  • :beta: “Don’t emit a warning for empty rmeta files.” rust#90072
  • 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

  • No PRs waiting on T-compiler this time.

Oldest PRs waiting for review

T-compiler

  • “Direct users towards using Rust feature names in CLI” rust#87402 (last review activity: 23 days ago)
  • “Fix ICE with inferred type in const or static item” rust#89161 (last review activity: about 2 weeks ago)
  • “Type inference for inline consts” rust#89561 (last review activity: 15 days ago)
  • “Fix suggestion of additional pub when using pub pub fn ...rust#87901 (last review activity: 2 months ago)
  • “Allow simd_bitmask to return byte arrays” rust#88868 (last review activity: 15 days ago)
  • “Turn TrapUnreachable off by default” rust#88826 (last review activity: 5 weeks ago)
  • “Implement concat_bytes!” rust#87599 (last review activity: 2 months ago)
  • “Recommend fix count() -> len() on slices” rust#87614 (last review activity: 2 months ago)
    • assigned to @cuviper, perhaps review should go now to t-libs see comment?

Issues of Note

Short Summary

P-critical

T-compiler

  • “cargo fails to build on Windows with nightly” rust#90019
    • opened by @Wesley Wiser
    • fixed by @mw, tracking beta-backport approval of rust#90050
  • “Miscompilation when awaiting generator containing an enum with niche at least [0, 1]” rust#90038
    • opened by @tmandry
    • stable-to-beta P-critical regression
    • needs beta backport of rust#90040

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

Performance logs

triage logs for 2021-10-19

A week where improvements outweigh regressions. The highlight of the week is the change to split out LLVM profile guided optimization (PGO) and using clang 13 to compile LLVM which led to improvements in many real world crates (e.g., cargo) in the range of 10%. Most regressions were limited and at most in the less than 1% range. We are seeing more performance changes in rollups which are supposed to be performance neutral. We’ll have to decide how to best address this.

Triage done by @rylev. Revision range: 9475e609b8458fff9e444934a6017d2e590642cf..d45ed7502ad225739270a368528725930f54b7b6

3 Regressions, 4 Improvements, 2 Mixed; 2 of them in rollups 34 comparisons made in total

Regressions

Rollup of 6 pull requests #89858

  • Moderate regression in instruction counts (up to 0.7% on incr-unchanged builds of cranelift-codegen)
  • This rollup is the kind that is very hard to diagnose because none of the individual PRs seem to be risky.
  • Left a comment about possible causes and a call out for more investigation.

add slice::swap_unchecked #88540

  • Small regression in instruction counts (up to 1.5% on full builds of piston-image)
  • Seems like we’re doing more bounds checking than is necessary when using slice::swap though this should only happen when debug assertions are on which is not the case in the compiler.
  • It is interesting that this has predominately impacted full build scenarios, but it’s not clear why this would be the case.
  • It’s already been suggested to revert this, and I’ve left a comment as such in the PR.

Associated consts sidebar #89815

  • Moderate regression in instruction counts (up to 0.9% on full builds of many-assoc-items)
  • Expected since we’re doing more work and the benchmark in question is explicitly meant to test the worst case in this scenario.

Improvements

  • Remove textual span from diagnostic string #89555 polymorphization: shims and predicates #89514
  • Split out LLVM PGO step and use clang 13 to compile LLVM #89499
  • Revert “Auto merge of #89709 - clemenswasser:apply_clippy_suggestions… #89905

Mixed

Rollup of 10 pull requests #89939

  • Large improvement in instruction counts (up to -1.7% on full builds of inflate)
  • Moderate regression in instruction counts (up to 1.0% on full builds of diesel)
  • No obvious place where the regressions or improvements are coming from.
  • Most likely culprit is #89915 as most other PRs in the rollup seem to be pretty low risk.
  • Left a comment saying as much.

Index and hash HIR as part of lowering #89124

  • Very large improvement in instruction counts (up to -5.4% on full builds of cranelift-codegen)
  • Very large regression in instruction counts (up to 5.3% on full builds of unused-warnings)
  • Definitely looks related to the change in question (unused-warnings shows larges increases in HIR lowering).
  • Left a comment asking for clarification of next steps.

Untriaged Pull Requests

Nominated Issues

T-compiler

  • “Add new tier 3 target: x86_64-unknown-nonerust#89062
  • “LTO toolchain compatability docs could use an update in case anything has changed in the last year” rust#89654
    • @Joshua Nelson nominated for T-compiler discussion

RFC

  • No nominated RFCs for T-compiler this time.