T Compiler Meeting Agenda 2022 07 14

T-compiler Meeting Agenda 2022-07-14

Announcements

Other WG meetings

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
  • Old MCPs (not seconded, take a look)
    • “Arbitrary annotations in compiletest” compiler-team#513 (last review activity: 2 months ago)
    • “Add support for the LoongArch architecture” compiler-team#518 (last review activity: about 27 days ago)
  • Pending FCP requests (check your boxes!)
    • “Stabilize -Zgcc-ld=lld as -Clink-self-contained=linker -Clinker-flavor=gcc-lldcompiler-team#510
    • “Increase the minimum linux-gnu versions” rust#95026
      • also mentioned in S-waiting-on-team section
    • “session: stabilize split debuginfo on linux” rust#98051
  • Things in FCP (make sure you’re good with it)
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Remove migrate borrowck mode” rust#95565
    • “Modify MIR building to drop repeat expressions with length zero” rust#95953
    • “Lang: Stabilize usage of rustc_nonnull_optimization_guaranteed on -1” rust#97122
    • “Remove a back-compat hack on lazy TAIT” rust#97346
    • “Make outlives::{components,verify} agree” rust#97406
    • “make cenum_impl_drop_cast deny-by-default” rust#97652
    • “make const_err show up in future breakage reports” rust#97743
    • “lub: don’t bail out due to empty binders” rust#97867
    • “allow unions with mutable references and tuples of allowed types” rust#97995

WG checkins

  • @_WG-llvm by @nagisa and @Nikita Popov (previous checkin):

    There have been some fixes for miscompiles and assertion failures. I think there’s also been quite some uptick in discussions about interaction between rust and LLVM semantics recently, in many different areas (like dereferenceability, provenance, GEP inbounds, noundef, poison propagation, etc…) Usually those don’t really go anywhere in the end though :) The LLVM 15 release is coming up, with branching at the end of the month. Expect an update around that time.

  • @_WG-traits (Types team) by @nikomatsakis and @Jack Huey (previous checkin):

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “promote placeholder bounds to ‘static obligations” rust#98713
    • fixes rust#98693, an unsound hole
    • PR from @nikomatsakis
    • nominated for backport by @Jack Huey
  • :beta: “Fix sized check ICE in asm check” rust#99124
    • fixes rust#99122, a P-medium ICE
    • PR from @Michael Goulet (compiler-errors)
    • nominated for backport by @oli
  • :stable: “Return a FxIndexSet in is_late_bound query.” rust#99219
    • Fixes a P-critical unsoundness rust#98890
    • @cuviper points out: this is a stable 1.62.0 backport of rust#98959

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

  • “Increase the minimum linux-gnu versions” rust#95026
    • what’s the current status?
    • One registered concern (announcement in a rust-lang blog post)
    • (comment): concerns raised for very old systems and IoTs
    • (comment): at some point we need to keep up with LLVM evolution
    • (comment): set a Minimum Supported Linux Kernel, so vendors can pin that version?
    • T-libs agreess to move forward (comment)

Oldest PRs waiting for review

T-compiler

  • “make member constraints pick static if no upper bounds” rust#89056 (last review activity: 9 months ago)
    • cc assigned reviewer @lqd
  • “Only compile #[used] as llvm.compiler.used for ELF targets” rust#93718 (last review activity: 2 months ago)
    • cc assigned reviewer @pnkfelix
  • “Allow impl Fn() -> impl Trait in return position” rust#93582 (last review activity: 2 months ago)
    • cc assigned reviewer @nikomatsakis
  • “More proc macro tweaks” rust#97445 (last review activity: about 47 days ago)
    • highfive bot auto assigned @eddyb, reroll dice?

Issues of Note

Short Summary

P-critical

T-compiler

  • “Wrong cast of u16 to usize on aarch64” rust#97463
  • for<'a> &'a T: 'a and closures regressed” rust#98437
    • discussed previously (notes)
    • not assigned
  • “Wrong optimization” rust#98568
  • “Incremental compilation bug with async fn method capturing multiple lifetimes” rust#98890
  • “ICE with probably recursive opaque types and closures” rust#99073

T-rustdoc

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

P-high regressions

P-high beta regressions

  • No P-high beta regressions this time.

Unassigned P-high nightly regressions

  • No unassigned P-high nightly regressions this time.

Performance logs

triage logs for 2022-07-12

A fairly noisy week (many entries below dropped and untagged as regressions), largely driven by tt-muncher and html5ever. Our sensitivity assessment currently takes roughly a week since new noise starts to learn the noise level, so it can take some time for oscillations to stop reporting somewhat spurious results.

Otherwise, this week had a number of solid improvements, and was overall positive, with improvements across many benchmarks.

Triage done by @simulacrum. Revision range: 880646ca9c6dc21e04efe2f1940369a45b71ff2d..b3f4c3119957aa0a250cab08ab586b7a9a680ef1

Summary:

mean max count
Regressions (primary) 0.7% 1.4% 19
Regressions (secondary) 2.1% 5.3% 13
Improvements (primary) -1.1% -2.5% 153
Improvements (secondary) -2.1% -9.9% 121
All (primary) -0.9% -2.5% 172

3 Regressions, 6 Improvements, 3 Mixed; 3 of them in rollups 53 artifact comparisons made in total

Regressions

Make lowering a query #95573 (Comparison Link)

mean max count
Regressions (primary) 0.5% 1.1% 76
Regressions (secondary) 0.8% 2.4% 57
Improvements (primary) N/A N/A 0
Improvements (secondary) -0.2% -0.2% 1
All (primary) 0.5% 1.1% 76

These results may partially be noise, and are overall limited enough in impact that further investigation is not warranted at this time. Marked as triaged.

Rollup of 6 pull requests #99047 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) 1.9% 4.0% 13
Improvements (primary) N/A N/A 0
Improvements (secondary) N/A N/A 0
All (primary) N/A N/A 0

Looks to be a genuine regression, far exceeding the noise bound for the deeply-nested-multi benchmark. (This is the 4% spike on that graph). Maybe caused by #98795, needs a little further investigation.

Enforce that layout size fits in isize in Layout #95295 (Comparison Link)

mean max count
Regressions (primary) 0.5% 1.5% 106
Regressions (secondary) 0.6% 1.7% 39
Improvements (primary) N/A N/A 0
Improvements (secondary) -1.3% -1.5% 6
All (primary) 0.5% 1.5% 106

As noted on the PR (thanks for triaging perf regressions!), this is a limited in magnitude and a justified regression for a soundness fix. See this comment for details.

Improvements

continue nll transition by removing stuff #98584 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -1.0% -2.3% 66
Improvements (secondary) -1.2% -3.6% 63
All (primary) -1.0% -2.3% 66

interpret: remove support for unsized_locals #98831 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) N/A N/A 0
Improvements (secondary) -0.6% -0.8% 11
All (primary) N/A N/A 0

Use a bitset instead of a hash map in HIR ID validator #98841 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.8% -1.7% 123
Improvements (secondary) -0.8% -2.0% 82
All (primary) -0.8% -1.7% 123

don’t use commit_if_ok during higher_ranked_sub #99056 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.7% -0.7% 7
Improvements (secondary) -0.8% -0.9% 6
All (primary) -0.7% -0.7% 7

More derive output improvements #98758 (Comparison Link)

mean max count
Regressions (primary) 0.6% 0.8% 2
Regressions (secondary) 1.6% 2.3% 10
Improvements (primary) -0.4% -0.6% 55
Improvements (secondary) -2.1% -8.0% 34
All (primary) -0.4% 0.8% 57

Regressions appear primarily in tt-muncher and are spurious noise; cargo and image also show slight regressions but much smaller in comparative magnitude. Overall a small, but solid improvement.

Miscellaneous inlining improvements #99028 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) 0.7% 1.4% 13
Improvements (primary) -0.4% -0.9% 124
Improvements (secondary) -0.5% -1.0% 62
All (primary) -0.4% -0.9% 124

Mixed

Rollup of 7 pull requests #98987 (Comparison Link)

mean max count
Regressions (primary) 0.6% 0.6% 1
Regressions (secondary) N/A N/A 0
Improvements (primary) -0.2% -0.2% 1
Improvements (secondary) -0.3% -0.6% 9
All (primary) 0.2% 0.6% 2

Rollup of 8 pull requests #99014 (Comparison Link)

mean max count
Regressions (primary) 0.5% 0.5% 1
Regressions (secondary) 0.3% 0.3% 1
Improvements (primary) N/A N/A 0
Improvements (secondary) -1.3% -1.5% 6
All (primary) 0.5% 0.5% 1

Don’t allow ZST in ScalarInt #98957 (Comparison Link)

mean max count
Regressions (primary) N/A N/A 0
Regressions (secondary) 4.4% 4.4% 2
Improvements (primary) N/A N/A 0
Improvements (secondary) -0.4% -0.4% 2
All (primary) N/A N/A 0

Nominated Issues

T-compiler

  • “Revert #94158, “Apply noundef metadata to loads of types that do not permit raw init”” rust#98966
    • nominated by @Ben Kimock (Saethlin)

    In #66151 we have decided against turning technically UB code into a panic on account of the amount of code that would be affected, so it doesn’t seem right to turn technically into directly visible to LLVM. If the breakage from adding a panic for this case is too high, the danger from turning this case into visible UB should be as well.

    • cc @Thom Chiovoloni

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-mir-opt by @oli
  • @_wg-polymorphization by @davidtwco