Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default-enable share-generics, with available_externally to still allow inlining. #123610

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mark-Simulacrum
Copy link
Member

WIP, just experimenting, not clear whether this works for other codegen backends, or how practical of a tradeoff it is.

cc #14527

r? @Mark-Simulacrum for now

…ow inlining

WIP, just experimenting, not clear whether this works for other codegen
backends, or how practical of a tradeoff it is.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 7, 2024
@Mark-Simulacrum
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 7, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 7, 2024
…able-externally, r=<try>

Default-enable share-generics, with available_externally to still allow inlining.

WIP, just experimenting, not clear whether this works for other codegen backends, or how practical of a tradeoff it is.

cc rust-lang#14527

r? `@Mark-Simulacrum` for now
@bors
Copy link
Contributor

bors commented Apr 7, 2024

⌛ Trying commit 7f69532 with merge 0962dae...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling clippy_utils v0.1.79 (/checkout/src/tools/clippy/clippy_utils)
   Compiling clippy_lints v0.1.79 (/checkout/src/tools/clippy/clippy_lints)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/node-v14.20.0-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcZltcDl/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.1.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.2.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.3.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtermize-c7a48905630a139e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblibc-d781e4d0bd559ba2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-d309fb8dff361f55.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex_syntax-dee70cbc8fac328e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liburl-ada39c01bc4e6a49.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libidna-dea4d1cd8b23f18f.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_normalization-89dd72be5952094c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtinyvec-365b5070d9f2c3c3.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtinyvec_macros-a323c6a95e973099.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_bidi-e826bc9eb8afa748.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libform_urlencoded-ae2c416df2b9fd76.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libpercent_encoding-3eefe2b4ade1cf98.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_script-ace674e91852e84a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_metadata-eea0b9fc7e2d8057.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde_json-b806aa939ca8c5c1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitoa-f3a48618f3c263cd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libryu-e6f725997176aaf8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libthiserror-dbbc087c9b5117ef.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_platform-ff9c79ed397112f0.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcamino-e8741af77ea0d425.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquine_mc_cluskey-9306a5c86d0b5bce.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsemver-a3c7d0112b03dd7b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a5caefed43b884f1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libeither-819b42968b0e725b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-ab75470287fb516a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtoml-01ba813e7faed378.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtoml_edit-c14c8bb55677b7c7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde_spanned-51d2ad95ef6814d7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libindexmap-2f0b4f1d80f49c8b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libequivalent-68e75e713977ff84.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libhashbrown-9f4138127b7477b3.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libwinnow-0c00ea8ec0e68ae2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtoml_datetime-f813e19da74315c7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-760f3ddf509f5a11.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-e0a7bf6a5bdde861.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libarrayvec-3593909a6dd740b1.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lrustc_driver-4ba19744c17b5deb" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcolor_print-3d150f63456e171d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_tools_util-6b6f027064c939c6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libanstream-b8d0dc1be3ba0480.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libanstyle_query-661c16608c24dc9f.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libanstyle-7e5c03c2e62b31cb.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcolorchoice-f1c7f89740df823c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libanstyle_parse-63ed70c431afd483.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libutf8parse-e29e857f7efaa53c.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lstd-08671b12291f7c47" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-882fe790db33f712.rlib" "-Wl,-Bdynamic" "-lLLVM-18-rust-1.79.0-nightly" "-lstdc++" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib"
  = note: /usr/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.0.rcgu.o: in function `cargo_clippy::main':
          cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0xdc): undefined reference to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop'
          /usr/bin/ld: cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0xf3): undefined reference to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop'
          /usr/bin/ld: cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0x1ca): undefined reference to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop'
          /usr/bin/ld: cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0x4ab): undefined reference to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop'
          /usr/bin/ld: cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0x567): undefined reference to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop'
          /usr/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a.cargo_clippy.1b30f229dc7a1746-cgu.0.rcgu.o:cargo_clippy.1b30f229dc7a1746-cgu.0:(.text._RNvCs2kJLemVQrUo_12cargo_clippy4main+0xb8c): more undefined references to `<alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString> as core::ops::drop::Drop>::drop' follow
          /usr/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/cargo_clippy-b68f12bc5f48518a: hidden symbol `_RNvXsd_NtNtCs9Pny8QhWyEa_5alloc3vec9into_iterINtB5_8IntoIterNtNtNtCskdSSOX0Uuqp_3std3ffi6os_str8OsStringENtNtNtCs8vMtALEQCs_4core3ops4drop4Drop4dropB12_' isn't defined
          /usr/bin/ld: final link failed: bad value
          
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile `clippy` (bin "cargo-clippy") due to 1 previous error
warning: build failed, waiting for other jobs to finish...


@bors
Copy link
Contributor

bors commented Apr 8, 2024

☀️ Try build successful - checks-actions
Build commit: 0962dae (0962daeb17f2e991c4a789ba33922a22c8ccd091)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0962dae): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
14.5% [0.4%, 358.5%] 250
Regressions ❌
(secondary)
38.1% [0.8%, 286.8%] 248
Improvements ✅
(primary)
-6.9% [-24.5%, -0.5%] 18
Improvements ✅
(secondary)
-3.1% [-6.4%, -2.4%] 7
All ❌✅ (primary) 13.0% [-24.5%, 358.5%] 268

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
17.9% [1.9%, 62.3%] 273
Regressions ❌
(secondary)
29.5% [5.4%, 61.1%] 261
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 17.9% [1.9%, 62.3%] 273

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
14.1% [1.0%, 363.7%] 246
Regressions ❌
(secondary)
34.7% [1.3%, 228.6%] 244
Improvements ✅
(primary)
-8.0% [-25.9%, -1.3%] 16
Improvements ✅
(secondary)
-7.2% [-7.2%, -7.2%] 1
All ❌✅ (primary) 12.8% [-25.9%, 363.7%] 262

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.8% [0.1%, 20.3%] 95
Regressions ❌
(secondary)
6.4% [0.2%, 12.4%] 99
Improvements ✅
(primary)
-2.5% [-8.2%, -0.0%] 39
Improvements ✅
(secondary)
-5.8% [-11.0%, -0.4%] 8
All ❌✅ (primary) 2.0% [-8.2%, 20.3%] 134

Bootstrap: 665.855s -> 605.631s (-9.04%)
Artifact size: 318.49 MiB -> 382.00 MiB (19.94%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants