T-compiler Meeting Agenda 2021-10-28
Announcements
- 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 Felix or Wesley so we can pass it along). “If you see something, say something”
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: GH none, Zulip about 10 days ago)
- “Accept
pc
in place ofunknown
andunknown
in place ofpc
forx86_64
andi?86
targets” compiler-team#441 (last review activity: GH none, Zulip 1 month 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!)
- “Tracking issue for
#![feature(const_precise_live_drops)]
” rust#73255 - “Stabilize -Z strip as -C strip” rust#90058
- “Stabilize -Z symbol-mangling-version as -C symbol-mangling-version” rust#90128
- “Tracking issue for
- Things in FCP (make sure you’re good with it)
- “Write text output files to stdout if options like
-o -
or--emit asm=-
are provided” compiler-team#431
- “Write text output files to stdout if options like
- Accepted MCPs
- “Tier 3 target proposal: x86_64-unknown-none (freestanding/bare-metal x86-64)” compiler-team#462
- Finalized FCPs (disposition merge)
- No new finished FCP (disposition merge) this time.
WG checkins
-
@WG-mir-opt checkin by @oli (previous checkin):
We have moved to a “merge fast” policy for new mir opts. This means we add them behind mir-opt-level=4 (very unstable, probably unsound) without necessarily reviewing them with the detail required for anything we expose to users. This allows us to quickly move ahead with new opts without burdening the author with too much rebasing due to mir tests changing under them.
#90016 is an optimization currently WIP that uses dataflow to figure out when a match arm is unreachable. This is a very simple form of VRA (value range analysis) that only works for matches on integers, bools and chars, but it is expected to become more powerful and be able to handle enums and comparisons, too.
-
@wg-polymorphization checkin by @davidtwco (previous checkin):
There’s a polymorphization update! Surprise!
- @_davidtwco submitted #89426 which makes polymorphization pass tests on master, removes some special-case predicate logic that isn’t necessary now (after earlier work on the v0 mangling scheme that landed many months ago), and makes the
unused_generic_params
query work on instances rather than just functions (so that shims can be polymorphized). Approved and merged by @_lcnr. - @lcnr is working on a fix for #75325, this is the primary blocker for polymorphization, and the fix should enable greater polymorphization in the long run. Work-in-progress PR at #90057, and some rough sketches of the design in a HackMD document.
- @_davidtwco submitted #89426 which makes polymorphization pass tests on master, removes some special-case predicate logic that isn’t necessary now (after earlier work on the v0 mangling scheme that landed many months ago), and makes the
Backport nominations
T-compiler stable / T-compiler beta
- :beta: “Fix ICE when forgetting to
Box
a parameter to aSelf::func
call” rust#90221- Closes a
P-high
issue rust#90213 - (Unilaterally approved by @pnkfelix, no discussion required.)
- Closes a
- No stable nominations for
T-compiler
this time.
T-rustdoc stable / T-rustdoc beta
- :beta: “Fix documentation header sizes” rust#90186
- no concerns from
T-rustdoc
, can be safely beta-backported
- no concerns from
- No stable nominations for
T-rustdoc
this time.
:back: / :shrug: / :hand:
PRs S-waiting-on-team
- “Change default panic strategy to abort for wasm32-unknown-emscripten” rust#89762
- also nominated by @pnkfelix (see comment) to discuss the strategy to adopt
- Fixes a P-high issue rust#85821, emscripten target compiling on trivial code
Oldest PRs waiting for review
- “Fixes incorrect handling of ADT’s drop requirements” rust#90218
- fixes a
P-high
occurring when trying to migrate code to 2021 edition - (pnkfelix askes during meeting: this shouldn’t be on this list)
- fixes a
- “Support #[global_allocator] without the allocator shim” rust#86844 (last review activity: 2 months ago)
- seems to need a reviewer assigned
- review from
T-lang
orT-compiler
?
- “Turn TrapUnreachable off by default” rust#88826
- seems to need a reviewer assigned
- “Allow use of AddressSanitizer on Windows by linking to existing libraries” rust#89369
- “debuginfo: Add script for Rust support in lldb-mi” rust#89163 (last review activity: 19 days ago)
- “Implement concat_bytes!” rust#87599 (last review activity: 3 months ago)
- “Make specifying repr optional for fieldless enums” rust#88203 (last review activity: 2 months ago)
- review seems to point out there’s some more work to do, see comment
Issues of Note
Short Summary
- 1 T-compiler P-critical issues
- 75 T-compiler P-high issues
- 2 P-critical, 0 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
- 1 P-critical, 47 P-high, 84 P-medium, 11 P-low regression-from-stable-to-stable
P-critical
- “cargo fails to build on Windows with nightly” rust#90019
- assigned to @mw, re-opened to track beta-backport (beta-accepted)
- No
P-critical
issues forT-rustdoc
this time.
P-high regressions
- “Incremental compilation fails in all cases on SystemZ (s390x)” rust#90123
- incremental compile ICE on Tier 2 platform
- There seems to be a patch on the way to fix (see comment)
- “regression: rustc suggests
.as_ref()
at incorrect location and other spans have regressed” rust#90286- assigned P-high as it could be confusing for beginners
- “DWARF info for
static
vars in lib crates has stopped being produced reliably in LTO builds” rust#90357- needs an assignee
- bisection seems to point to PR rust#89041 (cc: @nagisa)
Unassigned P-high nightly regressions
- “Undefined reference to
getauxval
in functioninit_have_lse_atomics
when compiling to nightlyaarch64-unknown-linux-musl
” rust#89626- opened by @XAMPPRocky
- issue seems to receive mentions from other issues
- @Hans Kratz comments probably related to PR rust#83655
Performance logs
Multiple regressions this week, several of which were in rollups, without much to balance them out on the improvements front.
Triage done by @simulacrum. Revision range: d45ed7502ad225739270a368528725930f54b7b6..3c8f001d454b1b495f7472d8430ef8fdf10aac11
5 Regressions, 4 Improvements, 3 Mixed; 3 of them in rollups; 35 comparisons made in total
Regressions
resolve: Use NameBinding
for local variables and generic parameters #89100
- Very large regression in instruction counts (up to 99.5% on
incr-unchanged
builds ofstyle-servo
) - Reverted in #90130.
Rollup of 6 pull requests #90235
- Very large regression in instruction counts (up to 9.8% on
incr-full
builds ofdeeply-nested-async
) - Probably caused by new compiler-internal lint (#89558), which appears to be run on end-user code (despite being allow-by-default). Suggested a few possible fixes or a revert if we can’t do so quickly.
Inline CStr::from_ptr #90007
- Small regression in instruction counts (up to 0.4% on
incr-unchanged
builds ofhelloworld
) - Regression limited to stress tests and fairly minor. Seems likely to be a litle extra work in codegen, as the regressions are all in -opt builds. This change is done to permit better optimization, skipping a call to strlen in some cases, so seems worthwhile.
Implement coherence checks for negative trait impls #90104
- Small regression in instruction counts (up to 0.6% on
full
builds ofdiesel
) - Looks like a real regression, but the feature is important and the regression is relatively small.
Rollup of 5 pull requests #90203
- Moderate regression in instruction counts (up to 0.6% on
full
builds ofexterns
) - Regression limited to rustdoc, likely due to the addition of code-scraping from the examples directory. Does not seem major enough to warrant deep investigation, but have left a comment on the likely PR.
Improvements
- Adopt let_else across the compiler #89933
- Revert “resolve: Use NameBinding for local variables and generic parameters” #90130
- Specialize HashStable for [u8] slices #90208
- Build the query vtable directly. #90210
Mixed
Rollup of 10 pull requests #90067
- Small improvement in instruction counts (up to -1.4% on
incr-patched: println
builds ofcoercions
) - Moderate regression in instruction counts (up to 1.1% on
incr-patched: b9b3e592dd cherry picked
builds ofstyle-servo
) - Left a comment with a few suggestions, but the regression and improvements seem both major and without obvious cause.
Merge the two depkind vtables #89978
- Moderate improvement in instruction counts (up to -2.0% on
incr-unchanged
builds ofhelloworld
) - Moderate regression in instruction counts (up to 0.9% on
incr-unchanged
builds ofclap-rs
) - Improvements mostly outweigh the regressions
Make new symbol mangling scheme default for compiler itself. #90054
- Moderate improvement in instruction counts (up to -0.8% on
incr-unchanged
builds ofdeeply-nested-async
) - Moderate regression in instruction counts (up to 0.4% on
incr-unchanged
builds ofdeep-vector
) - Mostly improvements, and digging in is hard since tools like rustfilt have slightly different output across the symbol mangling boundary. Regressions seem limited to a just a few benchmarks and are small enough that this seems acceptable.
Untriaged Pull Requests
- #90235 Rollup of 6 pull requests
- #90067 Rollup of 10 pull requests
- #90054 Make new symbol mangling scheme default for compiler itself.
- #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
- #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
- #89100 resolve: Use
NameBinding
for local variables and generic parameters - #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
Nominated Issues
- “Add new tier 3 target:
x86_64-unknown-none
” rust#89062- @Josh Triplett nominated for T-compiler discussion
- discussed last week
- PR probably needs stakeholders to move forward, see comment
- does
T-compiler
need to follow up on the discussion? Josh’s comment
- “sess: default to v0 symbol mangling” rust#89917
- PR opened by @davidtwco
- @mw nominated to discuss @wesley wiser suggestion
- “Enable verification for 1/32th of queries loaded from disk” rust#90361
- PR opened by @simulacrum
- PR should fix rust#85783
- nominated by @mw (comment) to evaluate the perf regression and possible new fingerprint errors
- No nominated RFCs for
T-compiler
this time.