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

[perf only] Reimplement references debuginfo as projection. #119471

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

This PR is not meant to be merged: it completely breaks debuginfo, as LLVM does not support implicit pointers in debuginfo yet.

@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2023

r? @b-naber

(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 Dec 31, 2023
@cjgillot
Copy link
Contributor Author

r? @ghost

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 31, 2023
@cjgillot cjgillot added the A-mir-opt Area: MIR optimizations label Dec 31, 2023
@bors
Copy link
Contributor

bors commented Dec 31, 2023

⌛ Trying commit 4679331 with merge bda8139...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 31, 2023
[perf only] Reimplement references debuginfo as projection.

This PR is not meant to be merged: it completely breaks debuginfo, as LLVM does not support implicit pointers in debuginfo yet.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 31, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bda8139): 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.4% [0.3%, 0.6%] 2
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 3
Improvements ✅
(primary)
-0.8% [-3.6%, -0.2%] 31
Improvements ✅
(secondary)
-1.5% [-2.4%, -0.2%] 15
All ❌✅ (primary) -0.7% [-3.6%, 0.6%] 33

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)
5.9% [2.2%, 13.2%] 3
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
-3.4% [-5.8%, -0.2%] 5
Improvements ✅
(secondary)
-4.4% [-6.7%, -2.1%] 2
All ❌✅ (primary) 0.1% [-5.8%, 13.2%] 8

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)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
-1.6% [-3.2%, -0.8%] 7
Improvements ✅
(secondary)
-4.1% [-6.1%, -2.1%] 13
All ❌✅ (primary) -1.6% [-3.2%, -0.8%] 7

Binary size

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.3% [0.0%, 2.1%] 48
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.5% [-3.8%, -0.0%] 51
Improvements ✅
(secondary)
-0.8% [-3.0%, -0.2%] 23
All ❌✅ (primary) -0.1% [-3.8%, 2.1%] 99

Bootstrap: 667.255s -> 665.75s (-0.23%)
Artifact size: 311.75 MiB -> 311.88 MiB (0.04%)

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

cjgillot commented Apr 7, 2024

@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 Apr 7, 2024
@bors
Copy link
Contributor

bors commented Apr 7, 2024

⌛ Trying commit 36fae9e with merge 7490ccd...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 7, 2024
[perf only] Reimplement references debuginfo as projection.

This PR is not meant to be merged: it completely breaks debuginfo, as LLVM does not support implicit pointers in debuginfo yet.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-17 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 29.0s done
#16 DONE 41.1s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
.........................

failures:

---- [mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs stdout ----
4     debug x => _1;
5     debug n => _2;
6     let mut _0: u32;
-     scope 1 (inlined <u32 as Step>::forward) {
-         debug start => _1;
-         debug n => _2;
-         let _8: std::option::Option<u32>;
-         scope 2 {
-         }
-         scope 3 (inlined <u32 as Step>::forward_checked) {
-             debug start => _1;
-             debug n => _2;
-             scope 4 {
-                 debug n => _3;
-                 scope 6 (inlined core::num::<impl u32>::checked_add) {
-                     debug self => _1;
-                     debug rhs => _3;
-                     let mut _7: bool;
-                     scope 7 {
-                         debug a => _5;
-                         debug b => _6;
-                     }
-                     scope 8 (inlined core::num::<impl u32>::overflowing_add) {
-                         debug self => _1;
-                         debug rhs => _3;
-                         let mut _4: (u32, bool);
-                         let _5: u32;
-                         let _6: bool;
-                         scope 9 {
-                             debug a => _5;
-                             debug b => _6;
-                     }
-                 }
-             }
-             }
-             scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u32>::try_from) {
-                 debug value => _2;
-                 let mut _3: u32;
-         }
-         }
-         scope 10 (inlined Option::<u32>::is_none) {
-             debug (*(self: &Option<u32>)) => _8;
-             scope 11 (inlined Option::<u32>::is_some) {
-                 debug (*(self: &Option<u32>)) => _8;
-         }
-         }
-         scope 12 (inlined core::num::<impl u32>::wrapping_add) {
-             debug self => _1;
-             debug rhs => _3;
-     }
55 
56     bb0: {
-         StorageLive(_3);
-         StorageLive(_3);
-         StorageLive(_8);
-         _3 = _2 as u32 (IntToInt);
-         StorageLive(_5);
-         StorageLive(_6);
-         StorageLive(_4);
-         _4 = CheckedAdd(_1, _3);
-         _5 = (_4.0: u32);
-         _6 = (_4.1: bool);
-         StorageDead(_4);
-         StorageLive(_7);
-         _7 = unlikely(move _6) -> [return: bb1, unwind unreachable];
+         _0 = <u32 as Step>::forward(move _1, move _2) -> [return: bb1, unwind continue];
70 
71     bb1: {


-         switchInt(move _7) -> [0: bb2, otherwise: bb3];
- 
-     bb2: {
-         _8 = Option::<u32>::Some(_5);
-         StorageDead(_7);
-         StorageDead(_7);
-         StorageDead(_6);
-         StorageDead(_5);
-         StorageDead(_8);
-         goto -> bb4;
-     }
- 
-     bb3: {
-         _8 = const Option::<u32>::None;
-         StorageDead(_7);
-         StorageDead(_6);
-         StorageDead(_5);
-         StorageDead(_8);
-         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const core::num::<impl u32>::MAX, const 1_u32) -> [success: bb4, unwind continue];
- 
-     bb4: {
-     bb4: {
-         _0 = Add(_1, _3);
-         StorageDead(_3);
97     }
- }
- 
- 
- ALLOC0 (size: 8, align: 4) {
-     00 00 00 00 __ __ __ __                         │ ....░░░░
103 

thread '[mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs' panicked at src/tools/compiletest/src/runtest.rs:4357:21:
thread '[mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs' panicked at src/tools/compiletest/src/runtest.rs:4357:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.mir


failures:
    [mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs

@bors
Copy link
Contributor

bors commented Apr 7, 2024

☀️ Try build successful - checks-actions
Build commit: 7490ccd (7490ccd9e62d099f4cd387beead1413388281619)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7490ccd): 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.8% [0.5%, 1.5%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.7%, -0.2%] 61
Improvements ✅
(secondary)
-0.9% [-2.0%, -0.2%] 24
All ❌✅ (primary) -0.5% [-1.7%, 1.5%] 66

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)
5.3% [0.6%, 12.5%] 3
Regressions ❌
(secondary)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
-3.1% [-4.1%, -2.1%] 4
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) 0.5% [-4.1%, 12.5%] 7

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)
1.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
2.2% [1.8%, 2.6%] 7
Improvements ✅
(primary)
-1.2% [-1.4%, -1.0%] 4
Improvements ✅
(secondary)
-5.7% [-6.5%, -4.9%] 6
All ❌✅ (primary) -0.6% [-1.4%, 1.7%] 5

Binary size

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.4% [0.0%, 1.4%] 55
Regressions ❌
(secondary)
0.5% [0.2%, 1.3%] 4
Improvements ✅
(primary)
-0.3% [-1.3%, -0.0%] 44
Improvements ✅
(secondary)
-0.7% [-2.1%, -0.1%] 25
All ❌✅ (primary) 0.1% [-1.3%, 1.4%] 99

Bootstrap: 667.569s -> 663.649s (-0.59%)
Artifact size: 318.50 MiB -> 318.34 MiB (-0.05%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations perf-regression Performance regression. 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.

None yet

6 participants