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

treat host effect params as erased in codegen #115817

Merged
merged 1 commit into from Sep 14, 2023

Conversation

fee1-dead
Copy link
Member

This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being const fn.

r? @oli-obk

@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 Sep 13, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 13, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

Comment on lines 382 to 384
/// Returns generic arguments that are not lifetimes. Consider using `non_erasable_generics_real`
/// if you have access to the generics declaration that this instance is for.
#[inline]
pub fn non_erasable_generics(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a quick survey, all uses of this function have that information available, even if it requires some minor changes. Instead of passing in the generics, you could pass in the DefId to make it less verbose to use.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@oli-obk
Copy link
Contributor

oli-obk commented Sep 14, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Sep 14, 2023

📌 Commit a0a801c has been approved by oli-obk

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

bors commented Sep 14, 2023

⌛ Testing commit a0a801c with merge 5e71913...

@bors
Copy link
Contributor

bors commented Sep 14, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5e71913 to master...

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

Finished benchmarking commit (5e71913): comparison URL.

Overall result: ❌ regressions - 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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

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

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)
5.7% [5.7%, 5.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.7% [5.7%, 5.7%] 1

Binary size

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

Bootstrap: 632.643s -> 630.976s (-0.26%)
Artifact size: 317.91 MiB -> 317.91 MiB (-0.00%)

@fee1-dead fee1-dead deleted the fix-codegen branch September 15, 2023 16:21
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 25, 2023
…-obk

treat host effect params as erased in codegen

This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.

r? `@oli-obk`
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. 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

6 participants