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

rustc_metadata: Encode/decode some LazyArrays without an Option #107693

Merged
merged 4 commits into from
Feb 7, 2023

Conversation

petrochenkov
Copy link
Contributor

and a couple of related changes, see individual commits.

Addresses comments in #107166 (comment) and #107166 (comment), cc @cjgillot @oli-obk.

Change wording from "nullable" to "default".
Introduce a trait `IsDefault` for detecting values that are encoded as zeros or not encoded at all.
Add panics to impossible cases.
Some other minor cleanups.
Also add asserts to decoding `LazyArray`s with `Option`
@rustbot
Copy link
Collaborator

rustbot commented Feb 5, 2023

r? @oli-obk

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

@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 Feb 5, 2023
@petrochenkov
Copy link
Contributor 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 Feb 5, 2023
@bors
Copy link
Contributor

bors commented Feb 5, 2023

⌛ Trying commit f4e2b95 with merge 8d7ff5231e79dc945a8ff8a94dc7441ccd5e221d...

@bors
Copy link
Contributor

bors commented Feb 5, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8d7ff5231e79dc945a8ff8a94dc7441ccd5e221d): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@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)
0.7% [0.7%, 0.8%] 3
Improvements ✅
(primary)
-0.4% [-0.5%, -0.3%] 2
Improvements ✅
(secondary)
-0.9% [-1.3%, -0.3%] 11
All ❌✅ (primary) -0.4% [-0.5%, -0.3%] 2

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)
4.2% [2.0%, 6.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

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)
7.1% [3.4%, 8.7%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 5, 2023
@petrochenkov
Copy link
Contributor Author

I didn't expect it to be a perf change, but at least it's not a regression.
The externs changes are spurious as usual, both regressions and improvements, others may be too.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 6, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Feb 6, 2023

📌 Commit f4e2b95 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 Feb 6, 2023
@bors
Copy link
Contributor

bors commented Feb 6, 2023

⌛ Testing commit f4e2b95 with merge 4271e39e92a62ad546f7539eb321c4b7f07b671e...

@bors
Copy link
Contributor

bors commented Feb 6, 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 Feb 6, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Feb 6, 2023

@bors retry building LLVM: could not create temporary file whilst writing archive: no more archived files

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 6, 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 Feb 6, 2023
@bors
Copy link
Contributor

bors commented Feb 7, 2023

⌛ Testing commit f4e2b95 with merge 35d6d70...

@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)
[2568/3021] Linking CXX static library lib\libLLVMAggressiveInstCombine.a
[2569/3021] Linking CXX static library lib\libLLVMInstrumentation.a
[2570/3021] Linking CXX static library lib\libLLVMLinker.a
FAILED: lib/libLLVMLinker.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMLinker.a && D:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMLinker.a  lib/Linker/CMakeFiles/LLVMLinker.dir/IRMover.cpp.obj lib/Linker/CMakeFiles/LLVMLinker.dir/LinkModules.cpp.obj && D:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMLinker.a && cd ."
D:\a\rust\rust\mingw32\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
[2571/3021] Linking CXX static library lib\libLLVMObjCARCOpts.a
[2572/3021] Linking CXX static library lib\libLLVMInstCombine.a
[2573/3021] Building CXX object tools/lto/CMakeFiles/LTO.dir/lto.cpp.obj
[2574/3021] Linking CXX static library lib\libLLVMVectorize.a
[2574/3021] Linking CXX static library lib\libLLVMVectorize.a
[2575/3021] Linking CXX executable bin\yaml-bench.exe
[2576/3021] Linking CXX executable bin\UnicodeNameMappingGenerator.exe
[2577/3021] Linking CXX executable bin\not.exe
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 381.544 seconds
Build completed successfully in 0:08:27
Build completed successfully in 0:08:27
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

@bors
Copy link
Contributor

bors commented Feb 7, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 7, 2023
@bors bors merged commit 35d6d70 into rust-lang:master Feb 7, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (35d6d70): 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
Regressions ❌
(secondary)
2.7% [1.4%, 3.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

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

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.

6 participants