Skip to content

Remove some #[inline(always)] #104018

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

Closed

Conversation

Noratrieb
Copy link
Member

These are probably not necessary as the function bodies are trivial, so LLVM should inline them.

r? @compiler-errors as you told me to open the pr and want to start the perf run

These are probably not necessary as the function bodies are trivial, so
LLVM should inline them.
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Nov 5, 2022
@compiler-errors
Copy link
Member

@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 Nov 5, 2022
@bors
Copy link
Collaborator

bors commented Nov 5, 2022

⌛ Trying commit 22cb380 with merge b1c6494aa93caf777881ae15c6fa699693c247bd...

@bors
Copy link
Collaborator

bors commented Nov 5, 2022

☀️ Try build successful - checks-actions
Build commit: b1c6494aa93caf777881ae15c6fa699693c247bd (b1c6494aa93caf777881ae15c6fa699693c247bd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b1c6494aa93caf777881ae15c6fa699693c247bd): comparison URL.

Overall result: ❌ regressions - no 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.

@bors rollup=never
@rustbot label: +S-waiting-on-review -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)
- - 0
Regressions ❌
(secondary)
1.0% [1.0%, 1.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
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)
0.6% [0.6%, 0.6%] 1
Regressions ❌
(secondary)
8.4% [8.4%, 8.4%] 1
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) 0.1% [-0.4%, 0.6%] 2

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 6, 2022
@compiler-errors
Copy link
Member

Hm, doesn't look like it's worth (just noise), so I'd probably leave 'em as is.

@saethlin
Copy link
Member

saethlin commented Nov 6, 2022

Honestly with a significance factor of 1.08, I would do the perf run again and see if what the results look like. If it still regresses, try #[inline].

@saethlin
Copy link
Member

saethlin commented Nov 6, 2022

I think we could use include to select just deeply-nested-multi, if we want. Maybe with iterations=10 or something like that. I think the default is 1?

@Kobzol
Copy link
Contributor

Kobzol commented Nov 6, 2022

Perf looks neutral to me, which is a good result here I suppose. Hopefully it's because of LTO kicking in.

@cjgillot
Copy link
Contributor

cjgillot commented Nov 6, 2022

As these functions are defined in rustc_query_impl, MIR inlining can pick them up.
I'm moving this file in rustc_middle with #103808.
Defined in another crate, MIR inlining have access to them unless there they are marked #[inline].

@Noratrieb
Copy link
Member Author

Noratrieb commented Nov 6, 2022

Ah, I didn't notice that PR, with that it doesn't make sense and only causes conflicts. I guess they can still be changed from #[inline(always)] to #[inline] but that doesn't matter too much

@Noratrieb Noratrieb closed this Nov 6, 2022
@Noratrieb Noratrieb deleted the llvm-will-take-care-of-it branch November 6, 2022 11:35
@Noratrieb Noratrieb restored the llvm-will-take-care-of-it branch December 3, 2022 19:44
@Noratrieb Noratrieb deleted the llvm-will-take-care-of-it branch December 3, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.

8 participants