T Compiler Meeting Agenda 2022 10 13

T-compiler Meeting Agenda 2022-10-13

Announcements

Other WG meetings

MCPs/FCPs

  • New MCPs (take a look, see if you like them!)
    • “Introduce a #[rustc::*] tool attribute namespace and provide a stable #[rustc::on_unimplemented] attribute” compiler-team#560
    • -Z instrument-xray option” compiler-team#561
  • Old MCPs (not seconded, take a look)
    • “Arbitrary annotations in compiletest” compiler-team#513 (last review activity: 5 months ago)
    • “Add #[alias] attribute to allow symbol aliasing” compiler-team#526 (last review activity: 2 months ago)
    • “Use RangeInclusive in SpanData instead of lo/hi” compiler-team#534 (last review activity: about 48 days ago)
    • “Allow informational -Z flags on stable compiler” compiler-team#542 (last review activity: about 48 days ago)
    • " Promote i586-unknown-linux-gnu to Tier 2 with Host Tools " compiler-team#543 (last review activity: about 48 days ago)
    • “Lower baseline expectations for i686 unix-like targets” compiler-team#548 (last review activity: about 34 days ago)
    • “MCP: Flag to disable extended error info.” compiler-team#550 (last review activity: about 15 days ago)
    • “New Tier-3 target proposal: powerpc64-ibm-aix” compiler-team#553 (last review activity: about 34 days ago)
    • “configurable rustc timeout for compiletest tests” compiler-team#554 (last review activity: about 34 days ago)
    • “MCP: Raise UEFI Targets to Tier-2” compiler-team#555 (last review activity: about 34 days ago)
    • “Raise minimum supported macOS and iOS versions” compiler-team#556 (last review activity: about 34 days ago)
    • “Rustc Contributor Program Major Change Proposal” compiler-team#557 (last review activity: about 21 days ago)
  • Pending FCP requests (check your boxes!)
    • “Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error” rust#84022
  • Things in FCP (make sure you’re good with it)
    • “Only apply ProceduralMasquerade hack to older versions of rentalrust#94063
    • “Remove save-analysis.” rust#101841
    • “Elaborate supertrait bounds when triggering unused_must_use on impl Traitrust#102287
  • Accepted MCPs
  • Finalized FCPs (disposition merge)
    • “Tracking Issue for asm_sym” rust#93333
    • “add no_compile doctest attribute” rust#96573
    • “Allow transmutes between the same types after erasing lifetimes” rust#101520
    • “Change default level of INVALID_HTML_TAGS to warning and stabilize it” rust#101720
    • “make const_err a hard error” rust#102091

WG checkins

  • @_WG-rls2.0 by @Lukas Wirth (previous checkin)

    We changed how we order generics and parent generics fixing some gat related panics (no support got GATs yet though). Proc-macros stopped working in the rustc workspace due to the installed toolchain’s sysroot proc-macro server being picked unconditionally, now its possible to point r-a to a specific sysroot manually so proc-macros work once again. There is a PR open to make auto-trait bounds work in r-a, unfortunately that is blocked on r-a not being able to index the standard libraries crates.io dependencies yet which will require some changes in the rust repo/sysroot, see the accompanying zulip thread.

  • @_WG-self-profile by @mw and @Wesley Wiser (https://hackmd.io/7G80yGgQQjeW-TJCMrOSMA#WG-checkins)

    Nothing to report since last checkin.

Backport nominations

T-compiler stable / T-compiler beta

  • :beta: “Use rebind instead of dummy binder in SameTypeModuloInfer relation” rust#102059
    • nominated by @Michael Goulet (compiler-errors)
    • fixes #101984 and #102964 (both ICEs)
  • 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

  • 3 hidden issue waiting on teams or progressing

Oldest PRs waiting for review

T-compiler

  • “add with_hash_task to generate DepNode deterministically” rust#100987 (last review activity: about 49 days ago)
    • cc: @cjgillot for another round
  • “Format rustc_codegen_gcc” rust#101104 (last review activity: about 46 days ago)
    • cc: @Esteban Küber
  • “Recover when unclosed char literal is parsed as a lifetime in some positions” rust#101293 (last review activity: about 41 days ago)
    • cc: @Esteban Küber (new review assignee)
  • “Add powerpc-unknown-linux-muslspe compile target” rust#100860 (last review activity: about 34 days ago)
    • cc: @Wesley Wiser (has the author implemented the suggested changes?)
  • “Always disabling incremental linking on MSVC” rust#101550 (last review activity: about 32 days ago)
    • cc: @eddyb (perhaps switch s-waiting-on-author?)

Issues of Note

Short Summary

P-critical

T-compiler

  • as cast of non-Copy enum is no longer a move” rust#102389
    • T-lang agreed this behaviour is incorrect
    • issue needs an assignee

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-10-11

Overall, a fairly quiet week where the change to primary benchmarks ended up breaking exactly even. Secondary benchmarks saw improvements but not in large enough numbers for it to be particularly noteworthy.

Triage done by @rylev. Revision range: 02cd79a..1e926f0

Summary:

(instructions:u) mean range count
Regressions (primary) 0.8% [0.2%, 1.4%] 19
Regressions (secondary) 1.0% [0.3%, 1.8%] 9
Improvements (primary) -0.6% [-1.8%, -0.3%] 29
Improvements (secondary) -1.0% [-6.4%, -0.2%] 39
All (primary) -0.0% [-1.8%, 1.4%] 48

3 Regressions, 1 Improvements, 6 Mixed; 4 of them in rollups 41 artifact comparisons made in total

Regressions

Reduce CString allocations in std as much as possible #93668 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 1.0% [1.0%, 1.0%] 4
Regressions (secondary) 0.2% [0.2%, 0.2%] 2
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 1.0% [1.0%, 1.0%] 4
  • The hello-world opt benchmarks are dominated by link time.
  • It makes sense that a change to an FFI type CString could have an impact on these.
  • I don’t think there’s a need though to really do anything about it.

Rollup of 6 pull requests #102867 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.3%, 0.4%] 6
Regressions (secondary) 1.4% [1.2%, 1.6%] 6
Improvements (primary) - - 0
Improvements (secondary) -0.2% [-0.2%, -0.2%] 1
All (primary) 0.3% [0.3%, 0.4%] 6
  • The impacted benchmarks are more sensitive to changes to the trait system, so it looks like it might be #102845.
  • Kicked of a perf run to investigate.

tools/remote-test-{server,client}: Use /data/local/tmp on Android #102755 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.7% [0.6%, 0.9%] 6
Regressions (secondary) - - 0
Improvements (primary) - - 0
Improvements (secondary) - - 0
All (primary) 0.7% [0.6%, 0.9%] 6
  • Looks like Diesel is becoming more noisy lately. You can see that in this graph.

Improvements

Rewrite representability #100720 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) - - 0
Improvements (primary) -0.4% [-0.8%, -0.2%] 38
Improvements (secondary) -0.9% [-3.3%, -0.2%] 21
All (primary) -0.4% [-0.8%, -0.2%] 38

Mixed

Remove TypeckResults from InferCtxt #101632 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.7% [0.5%, 1.2%] 13
Regressions (secondary) 4.3% [3.2%, 5.7%] 6
Improvements (primary) -0.3% [-0.6%, -0.2%] 19
Improvements (secondary) -0.6% [-1.6%, -0.2%] 52
All (primary) 0.1% [-0.6%, 1.2%] 32
  • Looks specialization_graph::Children::insert is getting called way more.
  • Perhaps some strategic placement of inline could help help.

Rollup of 6 pull requests #102787 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.3%] 2
Regressions (secondary) 1.4% [1.1%, 1.9%] 6
Improvements (primary) -0.8% [-1.0%, -0.4%] 8
Improvements (secondary) -2.5% [-3.7%, -0.3%] 7
All (primary) -0.6% [-1.0%, 0.3%] 10
  • Most of the regressions are in secondary benchmarks, so I don’t think it’s worth investigating what caused this.

std: use futex in Once #99505 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.5% [0.5%, 0.5%] 1
Regressions (secondary) 1.7% [1.0%, 3.3%] 7
Improvements (primary) - - 0
Improvements (secondary) -0.3% [-0.5%, -0.2%] 9
All (primary) 0.5% [0.5%, 0.5%] 1
  • The regression results are small and neutral enough that we don’t need to investigate.

Rollup of 8 pull requests #102809 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.3% [0.2%, 0.4%] 13
Regressions (secondary) 0.4% [0.3%, 0.6%] 3
Improvements (primary) - - 0
Improvements (secondary) -1.1% [-1.1%, -1.1%] 1
All (primary) 0.3% [0.2%, 0.4%] 13

Rollup of 6 pull requests #102875 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) 0.2% [0.2%, 0.2%] 2
Regressions (secondary) - - 0
Improvements (primary) - - 0
Improvements (secondary) -5.0% [-6.6%, -1.8%] 5
All (primary) 0.2% [0.2%, 0.2%] 2
  • This is neutral enough that I don’t believe it warrants investigation.

slice: #[inline] a couple iterator methods. #96711 (Comparison Link)

(instructions:u) mean range count
Regressions (primary) - - 0
Regressions (secondary) 0.5% [0.3%, 0.7%] 4
Improvements (primary) -0.8% [-1.5%, -0.5%] 8
Improvements (secondary) -1.4% [-1.8%, -1.2%] 6
All (primary) -0.8% [-1.5%, -0.5%] 8
  • From the reviewer: “Perf results are more positive than negative, I think that’s all that matters for this kind of change. The regressions are minor ones in secondary benchmarks”

Nominated Issues

T-compiler

  • “Introduce a no-op FakeRead for let _ =.” rust#102256
    • Nominated by @pnkfelix, asks for T-compiler for more insights (see comment)
    • additional comments after T-lang meeting
  • “Enforce that closure: 'a requires that closure_ret_ty: 'a holds” rust#84385
    • Nominated by @Aaron Hill (see comment)
    • suggests the only way out is to make it first a warning, then a hard error. Asks for more insights.
  • “Massive performance regression between nightly-2022-08-12 and nightly-2022-08-13” rust#102952
    • issue reporter points out that LLVM upgrades sometimes causes substancial perf. regression in the wasmi WASM interpreter, also points to a previous case in rust#95409)
    • Suggests a possible idea for these regressions: “Due to missing guaranteed tail calls in Rust wasmi relies heavily on a non-guaranteed optimization for a loop-switch based interpreter hot path”
    • what is the context? is there an actionable for these issues? Are by nature of LLVM these optimizations not guaranteed (as pointed out by the reporter)?
    • should an upstream LLVM issue be reported?
  • “Performance regressions of compiled code over the last year” rust#47561
    • Very old perf. regression, triaged as P-medium at the time
    • nominated by @Ben Kimock (Saethlin) as it still exists (see comment)
    • asks for insights if these regressions can be ever resolved without introducing other issues

RFC

  • No nominated RFCs for T-compiler this time.

Next week’s WG checkins

  • @_WG-async-foundations by @nikomatsakis and @tmandry
  • Generic Associated Types initiative by @Jack Huey