T-compiler Meeting Agenda 2021-11-24
Announcements
- :loudspeaker: next week December, 2nd, release of Rust stable 1.57
- 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!)
- “Tier 3 target proposal: riscv64gc-linux-android (Android target for
riscv64gc
)” compiler-team#472
- “Tier 3 target proposal: riscv64gc-linux-android (Android target for
- 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 ofunknown
andunknown
in place ofpc
forx86_64
andi?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 54 days ago)
- Pending FCP requests (check your boxes!)
- No pending FCP requests this time.
- Things in FCP (make sure you’re good with it)
- “Unstable lints should be considered unknown” compiler-team#469
- “Tracking Issue for cargo report future-incompat” rust#71249
- “Tracking Issue for inline assembly (
asm!
)” rust#72016
- Accepted MCPs
- No new accepted proposals this time.
- Finalized FCPs (disposition merge)
- No new finished FCP (disposition merge) this time.
WG checkins
- @WG-diagnostics by @Esteban Küber and @oli (previous checkin):
nothing to report at this time
- @_WG-rustc-dev-guide by @Santiago Pastorino and @Yuki Okushi|217081 (previous checkin):
Most notable changes
- Make subtree docs an overview and add link to clippy docs for details #1244
- Describe drop elaboration #1240
- Edit bootstrapping chapter #1239
- Add documentation for LLVM CFI support #1234
Most notable WIPs
Backport nominations
T-compiler stable / T-compiler beta
- :beta: “relate lifetime in
TypeOutlives
bounds on drop impls” rust#90840- fixes p-critical unsoundness rust#90838
- @pnkfelix has also produced a scope-limited backport in rust#91136
- @Jack Huey comments on rust#91136 on which of the two is better suited for a backport
- :stable: “relate lifetime in
TypeOutlives
bounds on drop impls” rust#90840- see beta nomination
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
- No PRs waiting for T-compiler
Oldest PRs waiting for review
- “Add long explanation for E0726” rust#87655 (last review activity: 3 months ago)
- “Lint bare traits in AstConv.” rust#89090 (last review activity: about 60 days ago)
- “Introduce linter for diagnostic messages” rust#89455 (last review activity: about 49 days ago)
- Fix false positive for typoed crate or module suggestion (last activity: none)
- opened 1 month ago, needs a reviewer
- highfive bot assigned to @Esteban Küber
- Allow use of AddressSanitizer on Windows by linking to existing libraries (last activity: about 1 month ago)
- previously discussed and reassigned to @Wesley Wiser for review
- Introduce linter for diagnostic messages (last activity: about 40 days ago)
- previously reviewed by @Esteban Küber and @simulacrum
- “Support versioned dylibs” rust#90260 (last activity: 28 days ago)
- last review from @Wesley Wiser, then more comments
- Is this
S-waiting-on-author
?
- Postpone the evaluation of constant expressions that depend on inference variables (last activity: about 17 days ago)
- review from @lcnr, left some comments about merging this PR later after some more thoughts
Issues of Note
Short Summary
- 4 T-compiler P-critical issues
- 79 T-compiler P-high issues
- 2 P-critical, 4 P-high, 2 P-medium, 0 P-low regression-from-stable-to-beta
- 0 P-critical, 2 P-high, 2 P-medium, 1 P-low regression-from-stable-to-nightly
- 4 P-critical, 46 P-high, 84 P-medium, 12 P-low regression-from-stable-to-stable
P-critical
- “Miscompilation where binding only some fields leaks the others” rust#90752
- Mentioned in I-nominated issues
- “Unsound drop due to imperfect lifetime checks” rust#90838
- Has two PR fixing this: rust#90840 and rust#91136 from @pnkfelix (see backports)
- “Implied bounds by associated types as function parameters are inconsistent in an unsound way.” rust#91068
- opened by @Frank Steffahn, also bisected to PR rust#88312
- discussion about reverting rust#88312
- “Huge compile-time regression in beta/nightly” rust#91128
- we have a reproducible example
- seems correlated to the new LLVM pass-manager (disabling it solves the issue)
- (the new LLVM pass-manager will enter in stable and is enabled by default)
- No
P-critical
issues forT-rustdoc
this time.
P-high regressions
- “Compilation appears to loop indefinitely " rust#89195
- discussed last week
- @pnkfelix self assigned as reminder to reach out to Kyle Huey and schedule chat with @Aaron Hill
- discussed last week
- “regression: rustc suggests
.as_ref()
at incorrect location and other spans have regressed” rust#90286- @Esteban Küber comments wrt to a revert that it would cause another bug to resurface, would try to prepare a fix before the next release
- “DWARF info for
static
vars in lib crates has stopped being produced reliably in LTO builds” rust#90357- bisection seems to point to rust#89041 but cuviper suggests could be a dupe of rust#90301 and #89041 possibly just exacerbated the LLVM issue
- also reproduces on nightly
Unassigned P-high nightly regressions
- “Undefined reference to
getauxval
in functioninit_have_lse_atomics
when compiling to nightlyaarch64-unknown-linux-musl
” rust#89626- Seems that it now happens also on beta, which will become stable in a week
- @Hans Kratz suggest as a workaround
- discussed previously
- as a workaround
-Clinker=rust-lld
works - Issue should be fixed by rust#90527 + libc#2272 as soon as the fixed libc 0.2.107 is merged, see rust#90681
Performance logs
This week, there were a number of cases where the incr-unchanged
variants of inflate
went up or down by 5% to 6%; we believe these are instances of increased noise in benchmarks documented on rustc-perf#1105. I was tempted to remove these from the report, but its non-trivial to re-construct the report “as if” some benchmark were omitted.
Otherwise, there were some nice wins for performance. For example, PR #90996 more than halved the compilation time for full
builds of diesel
by revising how we hash ObligationCauseData
. If anyone is interested, it might be good to follow-up on the effects of PR #90352, “Simplify for
loop desugar”, where we have hypothesized that the increased compilation time is due to more LLVM optimizations being applied.
Triage done by @pnkfelix. Revision range: 934624fe..22c2d9dd
1 Regressions, 3 Improvements, 8 Mixed; 3 of them in rollups, 30 Untriaged PRs 34 comparisons made in total
Regressions
rustdoc: Make two small cleanups #91073
- Very large regression in instruction counts (up to 5.3% on
incr-unchanged
builds ofinflate
) - This was previously triaged as spurious by the PR author.
- (Only inflate debug incr-unchanged was affected significantly.)
Improvements
- Rollup of 7 pull requests #90966
- Optimize
impl Hash for ObligationCauseData
by not hashingObligationCauseCode
variant fields #90996 - Avoid documenting top-level private imports #91094
- rustdoc: Cleanup
DocFragment
#91034 - libcore: assume the input of
next_code_point
andnext_code_point_reverse
is UTF-8-like #89611
Mixed
Remove DropArena
. #90919
- Small improvement in instruction counts (up to -0.3% on
incr-patched: println
builds ofclap-rs
) - Very large regression in instruction counts (up to 6.1% on
incr-unchanged
builds ofinflate
) - This was triaged as noise in the PR comments both before it landed and after it landed.
std: Get the standard library compiling for wasm64 #90382
- Large improvement in instruction counts (up to -4.3% on
incr-unchanged
builds ofclap-rs
) - Moderate regression in instruction counts (up to 1.0% on
incr-unchanged
builds ofissue-88862
) - There were a lot of various changes in this PR, such as updates to dependencies (
compiler_builtins
anddlmalloc
). We probably shoud have done a pre-merge rust-timer run on this PR. - The flagged regressions of magnitude greater than 0.5% are isolated to “issue-88862 check” and “style-servo check”. The improvements tended to outweigh the regressions. For the most part almost all significant performance effects are isolated to check builds.
Rollup of 8 pull requests #91019
- Moderate improvement in instruction counts (up to -0.6% on
incr-unchanged
builds ofstyle-servo
) - Moderate regression in instruction counts (up to 0.8% on
full
builds ofawait-call-tree
) - The regression is entirely associated with doc builds, which led to the PR author to flag PR #90750 as the root cause.
- It seems to me like the extra work injected by PR #90750 may be unavoidable; but was it expected to be significant?
Implement clone_from
for State
#90535
- Small improvement in instruction counts (up to -0.2% on
full
builds ofmany-assoc-items
) - Very large regression in instruction counts (up to 6.1% on
incr-unchanged
builds ofinflate
) - This was evaluated for its effect on performance prior to merge; that run returned no relevant changes.
- As noted elsewhere, for this report we should probably treat “inflate” as noisy.
Update stdarch #91052
- Very large improvement in instruction counts (up to -5.8% on
incr-unchanged
builds ofinflate
) - Small regression in instruction counts (up to 0.3% on
incr-patched: println
builds ofhtml5ever
) - The only benchmark that regressed is “html5ever debug” (“incr-patched: println” and “incr-unchanged”), and only by a relatively small amount. This seems acceptable to me, compared to the effort involved in figuring out how this change could be related to that effect.
Point at source of trait bound obligations in more places #89580
- Large improvement in instruction counts (up to -5.0% on
incr-unchanged
builds ofinflate
) - Small regression in instruction counts (up to 1.1% on
incr-unchanged
builds ofwg-grammar
) - (Again, we can probably ignore the change to
inflate
.) - Other than that, there were a broad set of small regressions. Putting aside the ones tagged with
?
(“noisy”), there are 19 benchmarks that regressed by 0.10% to 0.42%. This seems like an acceptable cost.
Simplify for
loop desugar #90352
- Very large improvement in instruction counts (up to -6.2% on
incr-full
builds ofclap-rs
) - Large regression in instruction counts (up to 2.3% on
full
builds ofregex
) - This was triaged in the PR comments both before it landed and after it landed with the justification “The regressions seem to all be in
-opt
builds and solely part of the time spent in LLVM, so I’m hoping it’s that more optimizations apply now (and worst case some optimizations require more work but don’t result in better code).”
Manually outline error on incremental_verify_ich #89883
- Small improvement in instruction counts (up to -0.8% on
incr-unchanged
builds ofclap-rs
) - Large regression in instruction counts (up to 1.1% on
incr-unchanged
builds ofcoercions
) - The pre-merge rustc-timer run did not predict such a significant impact on
coercions
. - The driving force for this change was to reduce the critical path in bootstrap time, so the most important thing to look at is the bootstrap timing data. Specifically: while there is a big mix of ups and downs on the percentages column, the crate that takes the longest to compile (
rustc_query_impl
, the laggard at over 80 seconds of compilation time). - This PR brings the compilation time of
rustc_query_impl
from 87.1 seconds down to 85.6 seconds, a -1.8% improvement. - That is consistent with the predicted effect of the PR, and justifies the isolated impact on instruction counts.
Nominated Issues
- “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
- “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?
- No nominated RFCs for
T-compiler
this time.