T Compiler Meeting Agenda 2022 03 17

T-compiler Meeting Agenda 2022-03-17

Tracking Issue

Announcements

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (not seconded, take a look)
    • “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: 8 months ago)
    • “Make -Z binary-dep-depinfo the default behavior” compiler-team#464 (last review activity: 5 months ago)
    • “Tier 3 target proposal: riscv64gc-linux-android (Android target for riscv64gc)” compiler-team#472 (last review activity: 3 months ago)
    • -Dwarnings to cover all warnings” compiler-team#473 (last review activity: 3 months ago)
    • “Build-time execution sandboxing” compiler-team#475 (last review activity: 2 months ago)
    • “Dealing with type/const ambiguities” compiler-team#480 (last review activity: about 55 days ago)
  • Pending FCP requests (check your boxes!)
    • “Tracking issue for Consistent no-prelude attribute (RFC 501)” rust#20561
    • “Stabilize native library modifier syntax and the whole-archive modifier specifically” rust#93901
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Tracking Issue for RFC #2972: Constrained Naked Functions " rust#90957
    • “Stabilize ADX target feature” rust#93745
    • “Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait” rust#93827

WG checkins

@Esteban Küber reports: Nothing notable, a bunch of smaller improvements as usual.

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

Most notable changes

  • Edit glossary #1302
  • Edit “Queries” chapter #1301

Most notable WIPs

  • rewrite bootstrapping stages #1327
  • Document ErrorGuaranteed #1316
  • Edit “What the compiler does to your code” #1306
  • Describe Type Alias Impl Trait (TAIT) Inference Algorithm #1297
  • Extend debugging llvm section #1290
  • Added detail to codegen section #1216
  • Document inert vs active attributes #1110
  • Explain the new valtree system for type level constants. #1097

Backport nominations

T-compiler beta / T-compiler stable

  • :beta: “Revert accidental stabilization” rust#94805
    • nominated by @oli
    • Fixes P-high rust#94804
    • r’ed by @pnkfelix
    • (@apiraino relabeled to t-libs, unsure if correct)
  • :beta: “relax suspicious_auto_trait_impls lint wrt lifetimes” rust#94925
    • PR authored by @lcnr
    • fixes this comment from issue rust#93367
  • :stable: “Revert accidental stabilization” rust#94805
    • Same T-libs PR also nominated for beta backport

T-rustdoc beta / T-rustdoc stable

  • No backport nominations for T-rustdoc this time.

:back: / :shrug: / :hand:

PRs S-waiting-on-team

T-compiler

  • No PRs waiting on T-compiler

Oldest PRs waiting for review

T-compiler

  • “Enforce that closure: 'a requires that closure_ret_ty: 'a holds” rust#84385 (last review activity: 10 months ago)
    • assigned to and reviewed by @nikomatsakis
    • @oli flipped the flag to s-waiting-on-review
    • can remove label s-waiting-on-author, correct? (cc: @Aaron Hill)
  • “Mir-Opt for copying enums with large discrepancies” rust#85158 (last review activity: 4 months ago)
    • cc: @wesley wiser to r+
  • “Improve unsafe diagnostic” rust#91133 (last review activity: 3 months ago)
    • cc: @Esteban Küber
  • “Add debug assertions to some unsafe functions” rust#92686 (last review activity: 2 months ago)
    • first round of review from @Josh Triplett and @The 8472|239181

Issues of Note

Short Summary

P-critical

T-compiler

  • “Binary crashes when statically linked with LTO turned on” rust#94564
    • Issue has been pinned to reduce duplicates
    • bisection pointing to commit (comment)
    • assigned to @pnkfelix
  • “assertion failed: !value.has_escaping_bound_vars(): ICE when compiling crate tracing-subscriber v0.3.9rust#94998

T-rustdoc

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

P-high regressions

P-high beta regressions

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2022-03-15

Largely a quiet week. The perf improvement highlight is the use of real world crates such as syn, cargo, and serde in the collecting of profile guided optimization (PGO) profiles for LLVM. Previously only libcore was used for LLVM, though rustc PGO had more crates involved. This led to some decent improvement in compilation of real world crates (upwards of 5.5%).

On the regression side, the regressions were all largely small but contained inside of rollups making them hard to diagnose and correct. The perf team continues to work on process improvements that make changes to the compiler land through CI quickly while minimizing perf regressions that can sneak through.

Triage done by @rylev. Revision range: 10dccdc7fcbdc64ee9efe2c1ed975ab8c1d61287..3ba1ebea122238d1a5c613deb1bf60ce24bd8fd8

2 Regressions, 3 Improvements, 3 Mixed; 3 of them in rollups 27 Untriaged Pull Requests 42 comparisons made in total

Regressions

Rollup of 8 pull requests #94814

  • Arithmetic mean of relevant regressions: 2.1%
  • Arithmetic mean of all relevant changes: 1.8%
  • Largest regression in instruction counts: 16.8% on incr-patched: println builds of cargo opt
  • Mostly an extremely large regression in compiling optimized builds of cargo in an incremental patch scenario.
  • Looks like in the impacted test case the regression is largely in codegen
  • #94809 is the only change that meaningful touches codegen and luckily testing whether reverting the change makes a difference should be trivial to do. Left a comment here.

Rollup of 7 pull requests #94824

  • Arithmetic mean of relevant regressions: 0.5%
  • Arithmetic mean of relevant improvements: -0.3%
  • Arithmetic mean of all relevant changes: 0.4%
  • Largest regression in instruction counts: 1.5% on incr-unchanged builds of unicode_normalization check
  • Unfortunately there are many PRs that could plausibly contribute to the performance change:
    • #93950 (Use modern formatting for format! macros)
    • #94274 (Treat unstable lints as unknown)
    • #94368 ([1/2] Implement macro meta-variable expressions)
  • The overall regression seems low enough that I don’t think we need to consider reverting though. Unfortunately we don’t have a good process for determining the culprit in cases like this where many PRs seem somewhat equally likely to be the cause.
  • Left a comment as such here

Improvements

  • Improve AdtDef interning. #94733
  • Queryify is_doc_hidden #94897
  • Gather LLVM PGO profiles from rustc-perf suite on real-world crates

Mixed

Treat constant values as mir::ConstantKind::Val #94059

  • Arithmetic mean of relevant regressions: 1.3%
  • Arithmetic mean of relevant improvements: -1.0%
  • Arithmetic mean of all relevant changes: -0.9%
  • Largest improvement in instruction counts: -6.6% on full builds of ctfe-stress-4 opt
  • Largest regression in instruction counts: 1.6% on full builds of keccak check
  • Since the regressions are all in secondary benchmarks and relatively small, we consider this to be an improvement rather than a mixed result.

Change several HashMaps to IndexMap to improve incremental hashing performance #90253

  • Arithmetic mean of relevant regressions: 0.3%
  • Arithmetic mean of relevant improvements: -0.8%
  • Arithmetic mean of all relevant changes: -0.2%
  • Largest improvement in instruction counts: -7.5% on incr-full builds of clap-rs check
  • Largest regression in instruction counts: 0.6% on full builds of deep-vector check
  • Perf was run previously and it was found that there was a large improvements to clap-rs but otherwise an overall performance wash
  • This story has not really changed, so the PR was marked as triaged

Use MaybeUninit in VecDeque to remove the undefined behavior of slice #94472

  • Arithmetic mean of relevant regressions: 0.9%
  • Arithmetic mean of all relevant changes: -2.0%
  • Largest improvement in instruction counts: -10.7% on incr-patched: println builds of tokio-webpush-simple opt
  • Largest regression in instruction counts: 1.1% on full builds of tokio-webpush-simple opt
  • Dominated by a large improvement in the tokio-webpush-simple opt incremental patch test case, the micro benchmarks indicate that this is largely a performance wash (most benchmarks don’t seem to show statistical difference and those that do are a mix of small regressions and improvements)
  • Given all this, the PR was marked as triaged.

Nominated Issues

T-compiler

RFC

  • No nominated RFCs for T-compiler this time.