T Compiler Meeting Agenda 2021 11 04

T-compiler Meeting Agenda 2021-11-04

Tracking Issue

Announcements

  • Reminder: if you see a PR/issue that seems like there might be legal implications due to copywrite/IP/etc, please let the Core team know (or at least message @pnkfelix or @Wesley Wiser so we can pass it along).

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
    • No new proposals this time.
  • Old MCPs (not seconded, take a look)
    • “CI should exercise (subset of) tests under –stage 1” compiler-team#439 (last review activity: 2 months 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: 4 months ago)
    • “Make -Z binary-dep-depinfo the default behavior” compiler-team#464 (last review activity: about 34 days ago)
  • Pending FCP requests (check your boxes!)
    • “Tracking Issue for cargo report future-incompat” rust#71249
    • “Tracking issue for #![feature(const_precise_live_drops)]rust#73255
  • Things in FCP (make sure you’re good with it)
    • “Stabilize -Z strip as -C strip” rust#90058
    • “Stabilize -Z symbol-mangling-version=v0 as -C symbol-mangling-version=v0” rust#90128
  • Accepted MCPs
    • “Tier 3 target proposal: x86_64-unknown-none (freestanding/bare-metal x86-64)” compiler-team#462
  • Finalized FCPs (disposition merge)
    • “Write text output files to stdout if options like -o - or --emit asm=- are provided” compiler-team#431
    • “Tracking Issue for destructuring_assignmentrust#71126
    • “Tracking Issue for relaxed struct unsizing rules” rust#81793

WG checkins

@WG-rfc-2229 checkin from @nikomatsakis and @Matthew Jasper (previous checkin):

nikomatsakis:

there is a regression I"ve been investigating but in general this work stabilized and is complete I think we can close down the WG probably

@WG-rls2.0 checkin from @Lukas Wirth (previous checkin):

Steering issue covered by this checkin, https://github.com/rust-analyzer/rust-analyzer/issues/10370. This sprint was mainly about internal improvements, especially our macro test suite has seen some drastic changes, our AST grammar representation has seen some slight adjustments and we implemented some missing span-related proc-macro ABI functions. We also changed how we represent implicit delimiters resulting from macro variables for the time being due to some troubles with how rustc handles them, see r-a#10623. Finally attribute expansion is now usable enough that r-a expands attributes by default.

Backport nominations

T-compiler stable / T-compiler beta

T-rustdoc stable / T-rustdoc beta

  • :beta: “Show all Deref implementations recursively” rust#90183
  • :beta: “rustdoc: Go back to loading all external crates unconditionally” rust#90489
    • workaround for P-critical rust#84738 to load all creates at once
    • seems fine for backport
  • :beta: “Split doc_cfg and doc_auto_cfg features” rust#90502
  • :stable: “rustdoc: Go back to loading all external crates unconditionally” rust#90489
    • see beta nomination

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • “Make specifying repr optional for fieldless enums” rust#88203 (last review activity: 2 months ago)
    • review seems to point out there’s some more work to do, see comment
    • PR author @fee1-dead set flag to S-waiting-on-team
  • “Change default panic strategy to abort for wasm32-unknown-emscripten” rust#89762
    • Tier 2 target
    • discussed last week. This PR needs:
      • It’s changing a default: can people opt into the old panic-unwind setting?
      • Does a change like this needs an MCP?
      • who are the stakeholders for the emscripten backend?
      • consensus seems to let it move forward

Oldest PRs waiting for review

T-compiler

  • “Add codegen option for branch protection and pointer authentication on AArch64” rust#88354 (last review activity: 2 months ago)
  • “Check for duplicate attributes.” rust#88681 (last review activity: about 59 days ago)
  • “Mir-Opt for copying enums with large discrepancies” rust#85158 (last activity: 3 days ago)
  • Support #[global_allocator] without the allocator shim" rust#86844 (last review activity: 24 days ago)
    • @pnkfelix self assigned
  • “Makes docs for references a little less confusing” rust#88361 (last review activity: none)
    • rust-highfive assigned to @Josh Triplett (maybe another reviewer?)

Issues of Note

Short Summary

P-critical

T-compiler

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

T-rustdoc

  • “Index out of bounds when running cargo doc in rustc_metadata/src/creader.rsrust#84738
    • old issue reprioritized as P-critical by T-rustdoc
    • since 1.56 it breaks doc builds for some crates) (note: this comment)
    • under scrutiny by T-rustdoc

P-high regressions

P-high beta regressions

  • “Incremental compilation fails in all cases on SystemZ (s390x)” rust#90123
  • “regression: rustc suggests .as_ref() at incorrect location and other spans have regressed” rust#90286
    • confusing wrong diagnostic
    • currently unassigned
  • “DWARF info for static vars in lib crates has stopped being produced reliably in LTO builds” rust#90357
    • Felix self-assigned
    • bisection seems to point to PR rust#89041
  • “warn(must_not_suspend) started being raised incorrectly when moving from stable to nightly” rust#90459
    • currently unassigned
    • should be fixed by rust#89826 (landed on master, not yet in beta)

Unassigned P-high nightly regressions

  • “Undefined reference to getauxval in function init_have_lse_atomics when compiling to nightly aarch64-unknown-linux-muslrust#89626

Performance logs

triage logs for 2021-11-02

Summary: The only significant regressions were:

  1. two PRs that slowed down doc generation, and
  2. some slowdown from the new lints to flag occurrences of Unicode bidirectional control characters. The doc generation regression is being investigated.

Triage done by @pnkfelix. Revision range: 3c8f001d454b1b495f7472d8430ef8fdf10aac11..6384dca100f3cedfa031a9204586f94f8612eae5

6 Regressions, 3 Improvements, 1 Mixed; 4 of them in rollups 39 comparisons made in total.

30 Untriaged Pull Requests

Regressions

Fixes incorrect handling of ADT’s drop requirements #90218

  • Very large regression in instruction counts (up to 5.3% on full builds of regression-31157)
  • regression-31157 check regressed by 4.7% on incr and 5.3 on full.
  • issue-46449 check regressed by 1.89% on incr-full.
  • wg-grammar regressed by 1.3-1.4% in a bunch of scenarios.
  • but otherwise, this does not seem too bad. I think we should keep this PR approved for backport, while also look into fixing the regression on nightly.
  • filed #90504 as followup investigation issue.

Rollup of 3 pull requests #90387

  • Large regression in instruction counts (up to 2.4% on full builds of inflate)
  • 2 of the 3 pull requests appear trivial (fixing typos and removing extra lines in documentation), which leaves PR #90376 as the main suspect.
  • Meanwhile, all PR #90376 does, according to its description, is move code around, remove dead code, and inline a singly called function.
  • treating as alignment artifacts from code rearrangement. We tend not to micro-optimize that in the compiler.

Rollup of 8 pull requests #90416

  • Large regression in instruction counts (up to 2.7% on full builds of helloworld)
  • All the significant perf regressions are due to doc generation (many regressed by 1.0-2.7%).
  • filed #90512 as followup investigation issue.

Rollup of 5 pull requests #90422

  • Very large regression in instruction counts (up to 5.8% on full builds of tokio-webpush-simple)
  • All the significant perf regressions are due to doc generation (many regressed by 1.0-5.8%).
  • discussion is ongoing in PR 90183

impl Pattern for char array #86336

  • Small regression in instruction counts (up to 0.6% on full builds of deeply-nested-async)
  • The only benchmarks that regressed did so by a small amount, percentage wise 0.2-0.6%; the benchmarks that did regress in that fashion are: deeply-nested-async, helloworld, unify-linearly.
  • I don’t think its worth investing effort trying to figure out the root cause of this minor regression, unless someone wants to take it on as a self-educating exercise.

Update cargo #90490

  • Moderate regression in instruction counts (up to 2.0% on incr-patched: println builds of regression-31157)
  • Only regression-31157 opt regressed, by 1.6-2.0%.
  • It is not worth investing effort trying to figure out the root cause of this limited regression.
  • (Note: regression #31157 was itself put in to catch a performance regression with respect to time and RAM, but that regression was more like 1,882% in time and 10x in space.)

Improvements

  • Rollup of 4 pull requests #90314
  • Use SortedMap in HIR. #90145
  • Revert “Add rustc lint, warning when iterating over hashmaps” #90380

Mixed

[master] Fix CVE-2021-42574 #90462

  • Small improvement in instruction counts (up to -0.5% on full builds of deeply-nested-async)
  • Very large regression in instruction counts (up to 14.2% on incr-unchanged builds of coercions)
  • Filed issue #90514 for follow up investigation of coercions regression.

Nominated Issues

T-compiler

  • No nominated issues for T-compiler this time.

RFC

  • No nominated RFCs for T-compiler this time.