T Compiler Meeting Agenda 2021 11 18

T-compiler Meeting Agenda 2021-11-18

Tracking Issue

Announcements

  • Tomorrow we have our monthly planning meeting at time:2021-11-19T15:00:00-00:00
  • 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: 3 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 48 days ago)
    • “Unstable lints should be considered unknown” compiler-team#469 (last review activity: about 2 days ago)
  • Pending FCP requests (check your boxes!)
    • “Tracking Issue for cargo report future-incompat” rust#71249
    • “Tracking Issue for inline assembly (asm!)” rust#72016
  • Things in FCP (make sure you’re good with it)
    • No FCP requests this time.
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Tracking Issue for destructuring_assignmentrust#71126
    • “Tracking Issue for relaxed struct unsizing rules” rust#81793
    • “GATs: Decide whether to have defaults for where Self: 'arust#87479
    • “Stabilize const_raw_ptr_deref for *const Trust#89551
    • “Stabilize -Z strip as -C strip” rust#90058
    • “Stabilize -Z symbol-mangling-version=v0 as -C symbol-mangling-version=v0” rust#90128
    • “stabilize format args capture” rust#90473

WG checkins

  • @WG-async-foundations by @nikomatsakis and @tmandry (previous checkin)

    checkin text

  • @WG-traits by @nikomatsakis and @Jack Huey (previous checkin)

    Work continues on both GATs and TAITs. For GATs, the outlives lint landed, but needs a bit more work before stabilization. Whether or not to change the syntax of where clauses on GATs remains an open question. Some bug fixes for GATs/HRTBs have also landed, including normalizing predicates for closures. Negative impls for coherence also landed. (sorry for no links, on mobile! - Jack)

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “Android is not GNU” rust#90834
  • :beta: “relate lifetime in TypeOutlives bounds on drop impls” rust#90840
    • Fixes P-critical rust#90838
    • also nominated for stable backport
  • :beta: “Update llvm submodule” rust#90954
  • :stable: “Add deref_into_dyn_supertrait lint.” rust#89461
    • opened by @Charles Lew, fixes P-high rust#89190
    • nominated by @pnkfelix (it’s already in beta)
  • :stable: “relate lifetime in TypeOutlives bounds on drop impls” rust#90840
    • see beta nomination

T-rustdoc stable / T-rustdoc beta

  • :stable: “rustdoc: Go back to loading all external crates unconditionally” rust#90489
    • beta-backport approved last week
    • stable-backport deferred to this week, could probably follow the release timeline

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • “Make specifying repr optional for fieldless enums” rust#88203
  • “Make feature key optional for rustc_stable, rustc_const_stable attributes” rust#88588
    • Waiting for T-libs feedback

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)
  • “Suggest i += 1 when we see i++ or ++irust#88672 (last review activity: 2 months ago)
    • has been reviewed in September by @estebank
  • “asm/arm: allow r9 when usable, make diagnostics more specific” rust#88879 (last review activity: 2 months ago)
    • last comment is paging @Amanieu
  • “[experiment] remove diverge_from in box expr building” rust#89332 (last review activity: about 50 days ago)
  • “Makes docs for references a little less confusing” rust#88361 (last review activity: none)
    • rust-highfive assigned to @Josh Triplett

Issues of Note

Short Summary

P-critical

T-compiler

  • “Miscompilation where binding only some fields leaks the others” rust#90752
  • “Unsound drop due to imperfect lifetime checks” rust#90838

T-rustdoc

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

P-high regressions

P-high beta regressions

  • “Compilation appears to loop indefinitely " rust#89195
  • “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
  • “DWARF info for static vars in lib crates has stopped being produced reliably in LTO builds” rust#90357
  • “warn(must_not_suspend) started being raised incorrectly when moving from stable to nightly” rust#90459

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

A large amount of noise in the comparisons this week, likely due to new probabilistic query hash verification increasing likelihood of changes in each benchmark; solutions are being tracked in rustc-perf#1105.

Otherwise, though, the week largely amounted to a neutral one for performance. There were some regressions, particularly in doc builds, as a result of the addition of portable SIMD. These are relatively speaking minor and primarily impact small crates.

Triage done by @simulacrum. Revision range: eee8b9c7bafade55981d155dae71657f1cc55a22..934624fe5f66ce3fb8abf0597a6deb079783335f

5 Regressions, 2 Improvements, 6 Mixed; 2 of them in rollups

41 comparisons made in total 30 Untriaged Pull Requests

Regressions

pub use core::simd; #89167

  • Very large regression in instruction counts (up to 11.8% on full builds of helloworld)
  • Expected regression due to expansion of libcore size; this continues to be a pain point as we add features to the standard library. Largest regressions are in rustdoc builds as it’s more sensitive to the addition of new traits and impls.

proc_macro: Add an expand_expr method to TokenStream #87264

  • Very large regression in instruction counts (up to 5.3% on incr-unchanged builds of inflate)
  • Incremental regressions are likely to be due to random hashing added for incr-comp verification (which we may decide to disable during perf collection to avoid this). Otherwise, the regression is minimal to TokenStream processing.

MIRI says reverse is UB, so replace it with something LLVM can vectorize #90821

  • Moderate regression in instruction counts (up to 0.8% on full builds of deeply-nested)
  • Unclear cause to these regressions, but they seem to larely be in doc builds.

Rollup of 5 pull requests #90769

  • Very large regression in instruction counts (up to 84.9% on full builds of webrender-wrench)
  • Also has a small improvement, but that is likely to be the incremental verification noise.

Added the –temps-dir option #83846

  • Small regression in instruction counts (up to 0.5% on incr-unchanged builds of helloworld)
  • Unclear what the cause of this is; we would not generally expect a regression from such an introduction.

Improvements

  • Use Vec extend and collect instead of repeatedly calling push #90813
  • Address performance regression introduced by #90218 #90845

Mixed

Replace Copy/Clone compiler magic on arrays with library impls #86041

  • Moderate improvement in instruction counts (up to -1.2% on incr-unchanged builds of deeply-nested)
  • Moderate regression in instruction counts (up to 1.0% on full builds of cranelift-codegen)
  • Limited regressions in codegen, mostly due to more complicated MIR for these impls when done in library code vs. directly generated.

Optimize pattern matching #90746

  • Very large improvement in instruction counts (up to -5.3% on full builds of match-stress-enum)
  • Large regression in instruction counts (up to 4.0% on incr-unchanged builds of deep-vector)

rustdoc: Go back to loading all external crates unconditionally #90489

Make RawVec private to alloc #90542

  • Very large improvement in instruction counts (up to -5.1% on incr-unchanged builds of inflate)
  • Large regression in instruction counts (up to 4.0% on incr-unchanged builds of deep-vector)

Optimize Eq and Hash for Path/PathBuf #90596

  • Very large improvement in instruction counts (up to -6.0% on incr-unchanged builds of coercions)
  • Very large regression in instruction counts (up to 12.9% on incr-unchanged builds of tuple-stress)

Rollup of 8 pull requests #90945

  • Small improvement in instruction counts (up to -0.4% on full builds of deeply-nested-async)
  • Small regression in instruction counts (up to 0.3% on incr-patched: println builds of clap-rs)

Nominated Issues

T-compiler

  • “Tracking issue for plugin stabilization (plugin, plugin_registrar features)” rust#29597
  • “Change char type in debuginfo to DW_ATE_UTF” rust#89887
  • “sess: default to v0 symbol mangling” rust#89917
  • “implement aspect-oriented programming (AOP) for Rust” rust#90721
    • @mw suggested to first file an MCP
    • @davidtwco is a colleague of the author at Huawei and can coordinate between the compiler team and the author where required.
    • Does this might be of interest for T-lang?
  • “Miscompilation where binding only some fields leaks the others” rust#90752
    • @tmandry nominated
    • great writeup from @Dylan MacKenzie (ecstatic-morse), suggests a quick fix
    • Opened PR rust#90788 that implements the quick fix suggested. PR is beiung reviewed.
    • wg-prio assigned P-critical, but being a regression from stable probably not a release blocker?

RFC

  • No nominated RFCs for T-compiler this time.