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 #[inline] to as_deref #109357

Merged
merged 1 commit into from
Mar 26, 2023
Merged

Add #[inline] to as_deref #109357

merged 1 commit into from
Mar 26, 2023

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Mar 19, 2023

While working on #109247 I found an as_deref call in the compiler that should have been inlined. This fixes the missing inlining (but doesn't address the perf issues I was chasing).

r? @thomcc

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 19, 2023
@saethlin
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 Mar 19, 2023
@bors
Copy link
Contributor

bors commented Mar 19, 2023

⌛ Trying commit d3352de with merge a8e55ffe1b355d32d0bd1312ca73e3c14a36b2a2...

@bors
Copy link
Contributor

bors commented Mar 19, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a8e55ffe1b355d32d0bd1312ca73e3c14a36b2a2): comparison URL.

Overall result: ❌✅ regressions and improvements - 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-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.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-0.4%, -0.4%] 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.8% [0.6%, 1.1%] 3
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.6%, 1.1%] 3

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)
0.5% [0.4%, 0.5%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.6%, 0.5%] 5

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 20, 2023
@saethlin saethlin marked this pull request as ready for review March 20, 2023 01:42
@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@thomcc
Copy link
Member

thomcc commented Mar 21, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 21, 2023

📌 Commit d3352de has been approved by thomcc

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 Mar 21, 2023
@Noratrieb
Copy link
Member

perf was mostly neutral and the queue is pretty filled up
@bors rollup=maybe

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 21, 2023
Add #[inline] to as_deref

While working on rust-lang#109247 I found an `as_deref` call in the compiler that should have been inlined. This fixes the missing inlining (but doesn't address the perf issues I was chasing).

r? `@thomcc`
@bors
Copy link
Contributor

bors commented Mar 24, 2023

⌛ Testing commit d3352de with merge c4bd06483e83dd098d08b87715bcbe280096d771...

@bors
Copy link
Contributor

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

ehuss commented Mar 24, 2023

@bors retry

github incident

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2023
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 26, 2023
@bors
Copy link
Contributor

bors commented Mar 26, 2023

⌛ Testing commit d3352de with merge 821abb7f68162676092a4855637f32bcd16b5390...

@bors
Copy link
Contributor

bors commented Mar 26, 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 Mar 26, 2023
@ehuss
Copy link
Contributor

ehuss commented Mar 26, 2023

@bors retry

#108227 since LLVM update

@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 Mar 26, 2023
@scottmcm
Copy link
Member

@bors p=111 (Let's see if a non-compiler change can get through)

@bors
Copy link
Contributor

bors commented Mar 26, 2023

⌛ Testing commit d3352de with merge 836d3dc997cc36fda5d1d5e117c90cb1990fa4d2...

@scottmcm
Copy link
Member

@bors p=0 (resetting back to normal)

@bors
Copy link
Contributor

bors commented Mar 26, 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 Mar 26, 2023
@scottmcm
Copy link
Member

@bors retry

(someone kicked off #106428 instead of this one)

@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 Mar 26, 2023
@matthiaskrgr
Copy link
Member

@bors rollup=never

@rust-log-analyzer
Copy link
Collaborator

The job i686-mingw-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2525/3103] Linking CXX static library lib\libLLVMARMDisassembler.a
[2526/3103] Linking CXX static library lib\libLLVMARMAsmParser.a
[2527/3103] Linking CXX static library lib\libLLVMHexagonAsmParser.a
FAILED: lib/libLLVMHexagonAsmParser.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMHexagonAsmParser.a && C:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMHexagonAsmParser.a  lib/Target/Hexagon/AsmParser/CMakeFiles/LLVMHexagonAsmParser.dir/HexagonAsmParser.cpp.obj && C:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMHexagonAsmParser.a && cd ."
C:\a\rust\rust\mingw32\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
[2528/3103] Linking CXX static library lib\libLLVMMSP430Desc.a
[2529/3103] Building CXX object lib/ToolDrivers/llvm-dlltool/CMakeFiles/LLVMDlltoolDriver.dir/DlltoolDriver.cpp.obj
[2530/3103] Linking CXX static library lib\libLLVMAArch64AsmParser.a
[2531/3103] Linking CXX static library lib\libLLVMAArch64Disassembler.a
[2531/3103] Linking CXX static library lib\libLLVMAArch64Disassembler.a
[2532/3103] Building CXX object lib/XRay/CMakeFiles/LLVMXRay.dir/BlockVerifier.cpp.obj
[2533/3103] Building CXX object lib/XRay/CMakeFiles/LLVMXRay.dir/FDRRecordProducer.cpp.obj
[2534/3103] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.obj
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1cd66030c949c28d\cmake-0.1.48\src\lib.rs:975:5
 finished in 321.489 seconds
Build completed unsuccessfully in 0:06:32
Build completed unsuccessfully in 0:06:32
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

@scottmcm
Copy link
Member

@bors p=111 (The queue's doing nothing right now, but some are getting through, so let's give this a shot)

@bors
Copy link
Contributor

bors commented Mar 26, 2023

⌛ Testing commit d3352de with merge db0cbc4...

@bors
Copy link
Contributor

bors commented Mar 26, 2023

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing db0cbc4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 26, 2023
@bors bors merged commit db0cbc4 into rust-lang:master Mar 26, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (db0cbc4): 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.6% [0.6%, 0.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.6%, 0.6%] 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)
1.3% [0.4%, 2.2%] 32
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [0.4%, 2.2%] 32

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

@saethlin saethlin deleted the inline-as-deref branch April 2, 2023 19:29
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-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.