T-compiler Meeting Agenda 2021-10-21
Announcements
- :confetti: Today Thursday Oct, 21st release Rust stable 1.56 :confetti:
- Tomorrow time:2021-10-15T10:00:00-04:00 monthly Compiler team meeting
- Any legal questions about compiler copyright support?
MCPs/FCPs
- New MCPs (take a look, see if you like them!)
- No new proposals this time.
- Old MCPs (not seconded, take a look)
- “rustdoc is using rustc_ast_pretty, would it be possible to make it somewhat “stable”?” compiler-team#403 (last review activity: GH none, Zulip +3 months ago)
- “CI should exercise (subset of) tests under –stage 1” compiler-team#439 (last review activity: GH none, Zulip about 1 week ago)
- “Accept
pc
in place ofunknown
andunknown
in place ofpc
forx86_64
andi?86
targets” compiler-team#441 (last review activity: 3 months ago) - “Make
-Z binary-dep-depinfo
the default behavior” compiler-team#464 (last review activity: GH none, Zulip about 1 month ago)
- Pending FCP requests (check your boxes!)
- “Write text output files to stdout if options like
-o -
or--emit asm=-
are provided” compiler-team#431 - “Tracking issue for
#![feature(const_precise_live_drops)]
” rust#73255
- “Write text output files to stdout if options like
- Things in FCP (make sure you’re good with it)
- “Tier 3 target proposal: x86_64-unknown-none (freestanding/bare-metal x86-64)” compiler-team#462
- Accepted MCPs
- “lint internal hashmap iteration” compiler-team#465
- Finalized FCPs (disposition merge)
- “Make all proc-macro back-compat lints deny-by-default” rust#88041
- “Stabilize
unreachable_unchecked
asconst fn
” rust#89509
WG checkins
@wg-incr-comp by @pnkfelix and @Wesley Wiser (previous checkin):
pnkfelix thinks there is nothing to report since the last checkin
@WG-llvm by @nagisa (previous checkin):
A PR that’s about to land (if it hasn’t yet) to drop LLVM 10 support (last time I wrote an update we only “considered” it^^) NewPM did land. NewPM has led to some problems with build times and memory use due to different (and worse?) inlining and unrolling heuristics in some samples of code, but on average the build times did decrease significantly.
Backport nominations
T-compiler stable / T-compiler beta
- :beta: “Revert #86011 to fix an incorrect bound check” rust#90025
- fixes stable-to-nightly P-critical rust#89935
- :beta: “Erase late-bound regions before computing vtable debuginfo name.” rust#90050
- fixes stable-to-beta P-critical rust#90019
- nominated by @mw as it fixes a stable-to-beta regression
- :beta: “Don’t emit a warning for empty rmeta files.” rust#90072
- closes rust#89795
- nominated by @Eric Huss to remove this warning when running x.py
- 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
- No PRs waiting on
T-compiler
this time.
Oldest PRs waiting for review
- “Direct users towards using Rust feature names in CLI” rust#87402 (last review activity: 23 days ago)
- “Fix ICE with inferred type in const or static item” rust#89161 (last review activity: about 2 weeks ago)
- “Type inference for inline consts” rust#89561 (last review activity: 15 days ago)
- “Fix suggestion of additional
pub
when usingpub pub fn ...
” rust#87901 (last review activity: 2 months ago) - “Allow simd_bitmask to return byte arrays” rust#88868 (last review activity: 15 days ago)
- “Turn TrapUnreachable off by default” rust#88826 (last review activity: 5 weeks ago)
- “Implement concat_bytes!” rust#87599 (last review activity: 2 months ago)
- “Recommend fix
count()
->len()
on slices” rust#87614 (last review activity: 2 months ago)- assigned to @cuviper, perhaps review should go now to
t-libs
see comment?
- assigned to @cuviper, perhaps review should go now to
Issues of Note
Short Summary
- 2 T-compiler P-critical issues
- 74 T-compiler P-high issues
- 3 P-critical, 0 P-high, 3 P-medium, 0 P-low regression-from-stable-to-beta
- 0 P-critical, 2 P-high, 3 P-medium, 1 P-low regression-from-stable-to-nightly
- 1 P-critical, 46 P-high, 85 P-medium, 11 P-low regression-from-stable-to-stable
P-critical
- “cargo fails to build on Windows with nightly” rust#90019
- opened by @Wesley Wiser
- fixed by @mw, tracking beta-backport approval of rust#90050
- “Miscompilation when awaiting generator containing an enum with niche at least [0, 1]” rust#90038
- opened by @tmandry
- stable-to-beta P-critical regression
- needs beta backport of rust#90040
- No
P-critical
issues forT-rustdoc
this time.
P-high regressions
- No
P-high
beta regressions this time.
Unassigned P-high nightly regressions
- “CI: dist-s390x-linux build went from 40min. to 160min with new LLVM pass manager” rust#89609
- “Undefined reference to
getauxval
in functioninit_have_lse_atomics
when compiling to nightlyaarch64-unknown-linux-musl
” rust#89626E-needs-bisection
- relevant PR https://github.com/rust-lang/rust/pull/90044
Performance logs
A week where improvements outweigh regressions. The highlight of the week is the change to split out LLVM profile guided optimization (PGO) and using clang 13 to compile LLVM which led to improvements in many real world crates (e.g., cargo) in the range of 10%. Most regressions were limited and at most in the less than 1% range. We are seeing more performance changes in rollups which are supposed to be performance neutral. We’ll have to decide how to best address this.
Triage done by @rylev. Revision range: 9475e609b8458fff9e444934a6017d2e590642cf..d45ed7502ad225739270a368528725930f54b7b6
3 Regressions, 4 Improvements, 2 Mixed; 2 of them in rollups 34 comparisons made in total
Regressions
Rollup of 6 pull requests #89858
- Moderate regression in instruction counts (up to 0.7% on
incr-unchanged
builds ofcranelift-codegen
) - This rollup is the kind that is very hard to diagnose because none of the individual PRs seem to be risky.
- Left a comment about possible causes and a call out for more investigation.
add slice::swap_unchecked
#88540
- Small regression in instruction counts (up to 1.5% on
full
builds ofpiston-image
) - Seems like we’re doing more bounds checking than is necessary when using
slice::swap
though this should only happen when debug assertions are on which is not the case in the compiler. - It is interesting that this has predominately impacted full build scenarios, but it’s not clear why this would be the case.
- It’s already been suggested to revert this, and I’ve left a comment as such in the PR.
Associated consts sidebar #89815
- Moderate regression in instruction counts (up to 0.9% on
full
builds ofmany-assoc-items
) - Expected since we’re doing more work and the benchmark in question is explicitly meant to test the worst case in this scenario.
Improvements
- Remove textual span from diagnostic string #89555 polymorphization: shims and predicates #89514
- Split out LLVM PGO step and use clang 13 to compile LLVM #89499
- Revert “Auto merge of #89709 - clemenswasser:apply_clippy_suggestions… #89905
Mixed
Rollup of 10 pull requests #89939
- Large improvement in instruction counts (up to -1.7% on
full
builds ofinflate
) - Moderate regression in instruction counts (up to 1.0% on
full
builds ofdiesel
) - No obvious place where the regressions or improvements are coming from.
- Most likely culprit is #89915 as most other PRs in the rollup seem to be pretty low risk.
- Left a comment saying as much.
Index and hash HIR as part of lowering #89124
- Very large improvement in instruction counts (up to -5.4% on
full
builds ofcranelift-codegen
) - Very large regression in instruction counts (up to 5.3% on
full
builds ofunused-warnings
) - Definitely looks related to the change in question (
unused-warnings
shows larges increases in HIR lowering). - Left a comment asking for clarification of next steps.
Untriaged Pull Requests
- #89939 Rollup of 10 pull requests
- #89858 Rollup of 6 pull requests
- #89695 Move top part of print_item to Tera templates
- #89608 Rollup of 12 pull requests
- #89534 Introduce
tcx.get_diagnostic_name
- #89495 Add two inline annotations for hot functions
- #89435 Rollup of 6 pull requests
- #89405 Fix clippy lints
- #89263 Suggest both of immutable and mutable trait implementations
- #89165 Fix read_to_end to not grow an exact size buffer
- #89125 Don’t use projection cache or candidate cache in intercrate mode
- #89124 Index and hash HIR as part of lowering
- #89103 Migrate in-tree crates to 2021
- #89047 Rollup of 10 pull requests
- #89030 Introduce
Rvalue::ShallowInitBox
- #88945 Remove concept of ‘completion’ from the projection cache
- #88880 Rework HIR API to make invocations of the hir_crate query harder.
- #88824 Rollup of 15 pull requests
- #88804 Revise never type fallback algorithm
- #88719 Point at argument instead of call for their obligations
- #88703 Gather module items after lowering.
- #88627 Do not preallocate HirIds
- #88575 Querify
FnAbi::of_{fn_ptr,instance}
asfn_abi_of_{fn_ptr,instance}
. - #88540 add
slice::swap_unchecked
- #88308 Morph
layout_raw
query intolayout_of
. - #87781 Remove box syntax from compiler and tools
- #87064 Support
#[track_caller]
on closures and generators - #83302 Get piece unchecked in
write
Nominated Issues
- “Add new tier 3 target:
x86_64-unknown-none
” rust#89062- discussed last week
- @Josh Triplett nominated for T-compiler discussion
- does
T-compiler
need to follow up on the discussion? Josh’s comment
- “LTO toolchain compatability docs could use an update in case anything has changed in the last year” rust#89654
- @Joshua Nelson nominated for T-compiler discussion
- No nominated RFCs for
T-compiler
this time.