T Compiler Meeting Agenda 2021 12 02

T-compiler Meeting Agenda 2021-12-02

Tracking Issue

Announcements

  • :loudspeaker: today release of Rust stable 1.57 (the last for 2021 :))
  • 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!)
  • 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: 5 months ago)
    • “Make -Z binary-dep-depinfo the default behavior” compiler-team#464 (last review activity: 2 months ago)
  • Pending FCP requests (check your boxes!)
    • No pending FCP requests this time.
  • Things in FCP (make sure you’re good with it)
    • No FCP requests this time.
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Tracking Issue for cargo report future-incompat” rust#71249
    • “Tracking Issue for inline assembly (asm!)” rust#72016

WG checkins

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

nothing to report at this time

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

  • pretty disappointing that our hand is forced to turn off newPM for the time being; LLVM project is undergoing migration of their issue tracker from bugzilla to github, which may serve for a more straightforward experience in contributing issues to the LLVM project.
  • LLVM 13.0.1-rc1 release candidate out

Backport nominations

T-compiler stable / T-compiler beta

  • No beta nominations for T-compiler this time.
  • 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 PR waiting on T-compiler

Oldest PRs waiting for review

T-compiler

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
    • @pnkfelix fixed this in PR #90840 which was beta backported
    • next steps for this issue? perhaps close it?
  • “Implied bounds by associated types as function parameters are inconsistent in an unsound way.” rust#91068
  • “Huge compile-time regression in beta/nightly” rust#91128
    • @Nikita Popov points out the problematic IR generated by opt -03
    • previously discussion: the new pass-manager has been disabled in beta pre-1.57 with PR rust#91189 from @nagisa
    • Next steps for this issue? (still critical)?

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
    • already discussed
    • assigned to Felix
  • “regression: rustc suggests .as_ref() at incorrect location and other spans have regressed” rust#90286
    • assigned to Felix
    • @Esteban Küber commented about the possibility of authoring a PR
  • “DWARF info for static vars in lib crates has stopped being produced reliably in LTO builds” rust#90357

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

Overall, many changes this week, but overall an improvement on multiple benchmarks over the week from a number of pull requests dedicated to optimizations of certain patterns. We are still seeing a large number of spurious changes due to rustc-perf#1105, which has yet to be addressed.

Triage done by @simulacrum. Revision range: 22c2d9ddbf356bcdb718e88ca6ee3665e1e42690..1c0287830e0fb3c4007afea2819ba03766da6e9c

4 Regressions, 4 Improvements, 9 Mixed; 5 of them in rollups 41 comparisons made in total

Regressions

Mark places as initialized when mutably borrowed #90788

  • Moderate regression in instruction counts (up to 0.6% on full builds of match-stress-enum)
  • Fix for a miscompilation, so necessary regression.

Visit param_env field in Obligation’s TypeFoldable impl #91205

  • Very large regression in instruction counts (up to 6.6% on full builds of hyper-2)
  • Fix for incorrect code, regressions unfortunately unavoidable.

Improvements

  • Rollup of 6 pull requests #91159
  • Optimize live point computation #90491
  • Remove eval_always from upvars. #90580
  • Rollup of 8 pull requests #91388

Mixed

Avoid generating empty closures for fieldless enum variants #89881

  • Small improvement in instruction counts (up to -1.6% on incr-patched: add static arr item builds of coercions)
  • Small regression in instruction counts (up to 0.6% on incr-unchanged builds of clap-rs)
  • Primarily benefits bootstrap time (-5.4 seconds, -0.7%), instruction count changes largely real but not avoidable (differences in LLVM decision making).

Remove eval_always for inherent_impls. #90579

Faster Layout::array #91246

  • Large improvement in instruction counts (up to -4.2% on incr-unchanged builds of deep-vector)
  • Very large regression in instruction counts (up to 5.0% on incr-unchanged builds of inflate)
  • Most prominent regression is spurious, and overall this looks like improvements outweighing regressions.

Rollup of 7 pull requests #91269

  • Very large improvement in instruction counts (up to -5.1% on incr-unchanged builds of inflate)
  • Very large regression in instruction counts (up to 18.3% on incr-unchanged builds of clap-rs)
  • Regressions seem potentially real, but may also be related to rustc-perf#1105. Locally this seems to not be the case, though, so it seems probable that the regression is real.

Rollup of 6 pull requests #91288

  • Small improvement in instruction counts (up to -1.0% on incr-patched: b9b3e592dd cherry picked builds of style-servo)
  • Large regression in instruction counts (up to 1.7% on full builds of externs)
  • Seems to be a genuine regression. Unclear what the cause is.

Make TypeFolder::fold_* return Result #91230

  • Large improvement in instruction counts (up to -1.0% on incr-full builds of deeply-nested-async)
  • Large regression in instruction counts (up to 4.0% on incr-unchanged builds of deep-vector)
  • Regressions seem genuine, but are likely to be shuffling of instruction sequences rather than something directly addressable.

Update libc to 0.2.108 #90681

  • Very large improvement in instruction counts (up to -15.3% on incr-unchanged builds of clap-rs)
  • Large regression in instruction counts (up to 3.0% on incr-unchanged builds of deeply-nested-async)
  • Looks like a genuine regression, potentially slightly more work at crate loading time.

Tokenize emoji as if they were valid identifiers #88781

  • Small improvement in instruction counts (up to -0.8% on full builds of deeply-nested)
  • Small regression in instruction counts (up to 0.3% on incr-full builds of deeply-nested-async)
  • Genuine regression; more expensive logic in tokenization.

Rollup of 6 pull requests #91221

  • Moderate improvement in instruction counts (up to -1.3% on incr-unchanged builds of wg-grammar)
  • Small regression in instruction counts (up to 0.6% on full builds of ctfe-stress-4)
  • Regression seems genuine, though cause is unclear.

Untriaged Pull Requests

60 untriaged pull requests.

Nominated Issues

T-compiler

  • “Change char type in debuginfo to DW_ATE_UTF” rust#89887
  • “sess: default to v0 symbol mangling” rust#89917
  • “Stabilize -Z instrument-coverage as -C instrument-coveragerust#90132
    • @tmandry nominated
  • “implement aspect-oriented programming (AOP) for Rust” rust#90721
    • nominated by @mw (see comment)
    • suggested to open an RFC
  • “Miscompilation where binding only some fields leaks the others” rust#90752
    • discussed in P-critical
    • perhaps nomination can be removed?

RFC

  • No nominated RFCs for T-compiler this time.