Skip to content

Conversation

clubby789
Copy link
Contributor

@clubby789 clubby789 commented Jul 17, 2025

Makes use of llvm/llvm-project#138299 (once we pull in a version of LLVM with this attribute). Unfortunately also requires llvm/llvm-project#149336 to work.

Closes #104847

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 17, 2025
@clubby789 clubby789 added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Jul 17, 2025
@bors
Copy link
Collaborator

bors commented Jul 22, 2025

☔ The latest upstream changes (presumably #144249) made this pull request unmergeable. Please resolve the merge conflicts.

@clubby789 clubby789 removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Aug 13, 2025
@clubby789 clubby789 marked this pull request as ready for review August 13, 2025 13:30
@rustbot
Copy link
Collaborator

rustbot commented Aug 13, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 13, 2025
@clubby789
Copy link
Contributor Author

clubby789 commented Aug 13, 2025

r? compiler

edit: oops I guess that's automatic 😅

@rustbot rustbot assigned lcnr and unassigned fee1-dead Aug 13, 2025
@nikic
Copy link
Contributor

nikic commented Aug 13, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 13, 2025
Pass `alloc-variant-zeroed` to LLVM
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 13, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 13, 2025

💔 Test for f993fda failed: CI. Failed jobs:

@clubby789 clubby789 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2025
@nikic
Copy link
Contributor

nikic commented Aug 13, 2025

I think the alloc symbols are mangled nowadays, so we need to pass the symbols with the proper mangling.

@clubby789
Copy link
Contributor Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2025
bors added a commit that referenced this pull request Aug 20, 2025
Pass `alloc-variant-zeroed` to LLVM

Makes use of llvm/llvm-project#138299 (once we pull in a version of LLVM with this attribute). ~~Unfortunately also requires llvm/llvm-project#149336 to work.~~

Closes #104847
@bors
Copy link
Collaborator

bors commented Aug 20, 2025

⌛ Testing commit 3e9316a with merge 3372b83...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 20, 2025
@nikic
Copy link
Contributor

nikic commented Aug 20, 2025

Looks like the call to @"_ZN62_$LT$T$u20$as$u20$alloc..vec..spec_from_elem..SpecFromElem$GT$9from_elem17h22fb7d61224751b4E" in @vec_zero_tuple doesn't get inlined on wasm-wasip1 for whatever reason. Should probably restore the only-x86_64.

@clubby789
Copy link
Contributor Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2025
@nikic
Copy link
Contributor

nikic commented Aug 20, 2025

@bors r+

(retry is only if you make no changes)

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

📌 Commit 8ea3b09 has been approved by nikic

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

⌛ Testing commit 8ea3b09 with merge 040a98a...

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

☀️ Test successful - checks-actions
Approved by: nikic
Pushing 040a98a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 20, 2025
@bors bors merged commit 040a98a into rust-lang:master Aug 20, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 20, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e8a792d (parent) -> 040a98a (this PR)

Test differences

Show 18 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/vec-calloc.rs: pass -> [missing] (J4)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#normal: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> ignore (ignored when the LLVM version 19.1.1 is older than 21.0.0) (J7)

Stage 2

  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J0)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> ignore (ignored when the LLVM version 19.1.1 is older than 21.0.0) (J2)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> pass (J3)
  • [codegen] tests/codegen-llvm/vec-calloc.rs: ignore (only executed when the architecture is x86_64) -> [missing] (J5)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#llvm21: [missing] -> ignore (only executed when the architecture is x86_64) (J5)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#normal: [missing] -> ignore (only executed when the architecture is x86_64) (J5)
  • [codegen] tests/codegen-llvm/vec-calloc.rs: pass -> [missing] (J6)
  • [codegen] tests/codegen-llvm/vec-calloc.rs#normal: [missing] -> pass (J6)

Additionally, 6 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 040a98af70f0a7da03f3d5356531b28a2a7a77e4 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 6499.1s -> 8945.1s (37.6%)
  2. i686-msvc-2: 7878.1s -> 9200.7s (16.8%)
  3. x86_64-gnu-llvm-19: 2500.1s -> 2889.0s (15.6%)
  4. dist-aarch64-msvc: 6223.6s -> 5256.9s (-15.5%)
  5. pr-check-1: 1396.0s -> 1583.7s (13.4%)
  6. i686-gnu-2: 5456.9s -> 6097.5s (11.7%)
  7. dist-apple-various: 4804.6s -> 4248.7s (-11.6%)
  8. x86_64-gnu-tools: 3409.6s -> 3803.3s (11.5%)
  9. aarch64-gnu-llvm-19-2: 2177.7s -> 2413.3s (10.8%)
  10. aarch64-gnu: 6585.3s -> 7219.1s (9.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (040a98a): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 7
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.6% [3.2%, 4.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-4.4%, -3.1%] 3
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.66s -> 471.047s (-0.13%)
Artifact size: 378.20 MiB -> 378.31 MiB (0.03%)

@rustbot rustbot removed the perf-regression Performance regression. label Aug 20, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 26, 2025
Pass `alloc-variant-zeroed` to LLVM

Makes use of llvm/llvm-project#138299 (once we pull in a version of LLVM with this attribute). ~~Unfortunately also requires llvm/llvm-project#149336 to work.~~

Closes rust-lang#104847
@aeubanks
Copy link
Contributor

I believe this causing https://crbug.com/441524277. In summary, the rust calloc function _RNvCsfo6nMSlQo1l_7___rustc19___rust_alloc_zeroed definition does not have the alloc-family attribute, but user modules of it have the alloc-family attribute on the calloc declaration. however, if ThinLTO decides to import the function, we lose the alloc-family attribute and the verifier complains 'alloc-variant-zeroed' must name a function belonging to the same 'alloc-family'.

aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 28, 2025
rust-lang/rust#144086 is causing crashes in ThinLTO builds, temporarily revert while we figure out what to do.

Bug: 441524277
Change-Id: I8f68aeac9d582678443376c9195475e79b49c233
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6896856
Reviewed-by: Zequan Wu <zequanwu@google.com>
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Cr-Commit-Position: refs/heads/main@{#1508072}
@nikic
Copy link
Contributor

nikic commented Sep 1, 2025

@aeubanks Where does the definition without the attributes come from? Is this rustc failing to generate them, or is this something your specific setup is injecting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ER] Sub-optimal allocation of simple zeroed Vec of arrays
10 participants