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

Add assembly test to make sure that inlining works as expected when closures inherit target features #116078

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

eduardosm
Copy link
Contributor

Closes #108338 (the added test proves that it is working correctly)

@rustbot
Copy link
Collaborator

rustbot commented Sep 22, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 23, 2023

📌 Commit 3393f86 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Sep 23, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 23, 2023
…eature, r=Mark-Simulacrum

Add assembly test to make sure that inlining works as expected when closures inherit target features

Closes rust-lang#108338 (the added test proves that it is working correctly)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#115794 (Do not create a DerefLen place for `Box<[T]>`.)
 - rust-lang#116069 (Fix debug printing of tuple)
 - rust-lang#116075 (Document panics on unsigned wrapping_div/rem calls (rust-lang#116063))
 - rust-lang#116076 (Add Zba, Zbb, and Zbs as target features for riscv64-linux-android)
 - rust-lang#116078 (Add assembly test to make sure that inlining works as expected when closures inherit target features)

r? `@ghost`
`@rustbot` modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 24, 2023
…eature, r=Mark-Simulacrum

Add assembly test to make sure that inlining works as expected when closures inherit target features

Closes rust-lang#108338 (the added test proves that it is working correctly)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2023
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#114454 (Replace `HashMap` with `IndexMap` in pattern binding resolve )
 - rust-lang#116069 (Fix debug printing of tuple)
 - rust-lang#116076 (Add Zba, Zbb, and Zbs as target features for riscv64-linux-android)
 - rust-lang#116078 (Add assembly test to make sure that inlining works as expected when closures inherit target features)
 - rust-lang#116096 (Make FnDef 1-ZST in LLVM debuginfo.)
 - rust-lang#116116 (Rename the legacy feature gating macro)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Sep 24, 2023

⌛ Testing commit 3393f86 with merge 74d6a45...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2023
…ture, r=Mark-Simulacrum

Add assembly test to make sure that inlining works as expected when closures inherit target features

Closes rust-lang#108338 (the added test proves that it is working correctly)
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 24, 2023

💔 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 Sep 24, 2023
@eduardosm
Copy link
Contributor Author

Added opt-level=3 to the test. I guess x86_64-gnu-nopt disables optimizations by default.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 24, 2023

📌 Commit 5aba873 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Sep 24, 2023
@bors
Copy link
Contributor

bors commented Sep 25, 2023

⌛ Testing commit 5aba873 with merge 67ad3c2...

@bors
Copy link
Contributor

bors commented Sep 25, 2023

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 67ad3c2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 25, 2023
@bors bors merged commit 67ad3c2 into rust-lang:master Sep 25, 2023
12 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 25, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (67ad3c2): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) - - 0

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)
3.1% [3.1%, 3.1%] 1
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) 0.3% [-2.5%, 3.1%] 2

Cycles

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

Binary size

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

Bootstrap: 630.411s -> 631.29s (0.14%)
Artifact size: 317.18 MiB -> 317.22 MiB (0.01%)

@eduardosm eduardosm deleted the closure-inherit-target-feature branch September 25, 2023 16:32
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Oct 29, 2023
…_target_feature_sgx, r=Mark-Simulacrum

Fix closure-inherit-target-feature test for SGX platform

PR rust-lang#116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform.

cc: `@jethrogb`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 29, 2023
…_target_feature_sgx, r=Mark-Simulacrum

Fix closure-inherit-target-feature test for SGX platform

PR rust-lang#116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform.

cc: ``@jethrogb``
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 29, 2023
…_target_feature_sgx, r=Mark-Simulacrum

Fix closure-inherit-target-feature test for SGX platform

PR rust-lang#116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform.

cc: ```@jethrogb```
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 29, 2023
Rollup merge of rust-lang#117082 - fortanix:raoul/fix_closure_inherit_target_feature_sgx, r=Mark-Simulacrum

Fix closure-inherit-target-feature test for SGX platform

PR rust-lang#116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform.

cc: ```@jethrogb```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

closure doesn't seem to inherit the target attributes for codegen purposes
6 participants