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

Do partial SsaLocals analysis in unoptimized builds #134051

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Dec 9, 2024

I've been musing about the perf implications of all the queries that is_freeze results in.

(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)

@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 9, 2024
@saethlin saethlin added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 9, 2024
@rust-log-analyzer

This comment has been minimized.

@saethlin
Copy link
Member Author

saethlin commented Dec 9, 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 Dec 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 9, 2024
Do partial SsaLocals analysis in unoptimized builds

I've been musing about the perf implications of all the queries that `is_freeze` results in. Let's perf it. CI will fail because I'm too lazy to figure out what's going on with the mir-opt tests for now. If perf looks bad, it's not worth fixing the tests.

(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)

r? ghost
@bors
Copy link
Contributor

bors commented Dec 9, 2024

⌛ Trying commit 696799b with merge 46ae8eb...

@bors
Copy link
Contributor

bors commented Dec 9, 2024

☀️ Try build successful - checks-actions
Build commit: 46ae8eb (46ae8eb67ec584d3f0bbf4a2618c0d3b6e562473)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (46ae8eb): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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 the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.2%] 17
Regressions ❌
(secondary)
0.7% [0.1%, 1.1%] 8
Improvements ✅
(primary)
-0.5% [-0.9%, -0.2%] 21
Improvements ✅
(secondary)
-10.2% [-27.7%, -0.2%] 13
All ❌✅ (primary) 0.1% [-0.9%, 1.2%] 38

Max RSS (memory usage)

Results (primary 0.1%, secondary -14.2%)

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)
3.9% [2.0%, 6.8%] 3
Regressions ❌
(secondary)
2.7% [2.6%, 3.0%] 3
Improvements ✅
(primary)
-2.1% [-3.7%, -1.0%] 5
Improvements ✅
(secondary)
-26.8% [-29.2%, -25.2%] 4
All ❌✅ (primary) 0.1% [-3.7%, 6.8%] 8

Cycles

Results (primary 1.0%, secondary -8.2%)

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.0% [1.0%, 1.1%] 2
Regressions ❌
(secondary)
8.1% [2.3%, 10.3%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-31.0% [-36.5%, -10.6%] 5
All ❌✅ (primary) 1.0% [1.0%, 1.1%] 2

Binary size

Results (primary -0.5%, secondary -4.7%)

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.2% [0.0%, 0.9%] 39
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 8
Improvements ✅
(primary)
-1.2% [-6.2%, -0.0%] 33
Improvements ✅
(secondary)
-6.4% [-25.3%, -0.0%] 24
All ❌✅ (primary) -0.5% [-6.2%, 0.9%] 72

Bootstrap: 766.815s -> 768.247s (0.19%)
Artifact size: 330.84 MiB -> 330.83 MiB (-0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 9, 2024
@saethlin
Copy link
Member Author

saethlin commented Dec 9, 2024

Interesting. Looks like this removes ~98% of the LLVM time for deep-vector.

Also it looks for incr-unchanged and incr-patched builds we have a handful of improvements and no regressions, but for full and incr-full builds we're almost all regressions. The self-profile breakdown points to GVN as the culprit (of course) except for the image debug-full build where the regression is... in LLVM??? image debug-full is also the largest binary size regression which corroborates that. How strange.

@saethlin saethlin force-pushed the partial-ssa-analysis branch from 696799b to a0353d5 Compare February 9, 2025 23:50
@rust-log-analyzer

This comment has been minimized.

@saethlin saethlin force-pushed the partial-ssa-analysis branch from a0353d5 to a013042 Compare February 15, 2025 01:35
@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 Feb 15, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Do partial SsaLocals analysis in unoptimized builds

I've been musing about the perf implications of all the queries that `is_freeze` results in.

(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)
@bors
Copy link
Contributor

bors commented Feb 15, 2025

⌛ Trying commit a013042 with merge ef3fe2f...

@rust-log-analyzer

This comment has been minimized.

@saethlin saethlin force-pushed the partial-ssa-analysis branch 2 times, most recently from f73cd00 to 04cc82e Compare February 15, 2025 02:24
@rust-log-analyzer

This comment has been minimized.

@saethlin saethlin force-pushed the partial-ssa-analysis branch from 04cc82e to 5d55fae Compare February 15, 2025 03:21
@rust-log-analyzer

This comment has been minimized.

@saethlin saethlin force-pushed the partial-ssa-analysis branch from 5d55fae to f797c92 Compare February 15, 2025 04:36
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Feb 15, 2025
@saethlin
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 15, 2025

⌛ Trying commit 1580046 with merge b14fa64...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Do partial SsaLocals analysis in unoptimized builds

I've been musing about the perf implications of all the queries that `is_freeze` results in.

(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)
@bors
Copy link
Contributor

bors commented Feb 15, 2025

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b14fa64): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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 the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.2%] 23
Regressions ❌
(secondary)
0.5% [0.1%, 1.0%] 8
Improvements ✅
(primary)
-0.4% [-1.0%, -0.2%] 26
Improvements ✅
(secondary)
-0.8% [-1.4%, -0.2%] 9
All ❌✅ (primary) 0.1% [-1.0%, 1.2%] 49

Max RSS (memory usage)

Results (primary 2.7%, secondary -3.2%)

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% [3.1%, 10.5%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.9%, -2.1%] 3
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) 2.7% [-2.9%, 10.5%] 8

Cycles

Results (primary 1.0%)

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

Binary size

Results (primary -0.4%, secondary -1.1%)

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.2% [0.0%, 0.9%] 30
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 8
Improvements ✅
(primary)
-0.7% [-3.5%, -0.0%] 50
Improvements ✅
(secondary)
-1.7% [-6.1%, -0.0%] 18
All ❌✅ (primary) -0.4% [-3.5%, 0.9%] 80

Bootstrap: 790.529s -> 790.638s (0.01%)
Artifact size: 347.33 MiB -> 347.26 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 15, 2025
@saethlin saethlin force-pushed the partial-ssa-analysis branch from 1580046 to ffee3ac Compare March 14, 2025 18:53
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#20 exporting to docker image format
#20 sending tarball 20.7s done
#20 DONE 23.5s
##[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-18]
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--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', '--set', 'rust.lld=false', '--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: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
  Number of decisions:   4447
  longest path:          1159 (code:    152)
  longest backtrack:       66 (code:    428)
Shared 86733 out of 152951 states by creating 14756 new states, saving 71977
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/expmed.cc: In function ‘rtx_def* extract_bit_field_1(rtx, poly_uint64, poly_uint64, int, rtx, machine_mode, machine_mode, bool, bool, rtx_def**)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/expmed.cc:1864:45: warning: ‘*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’ may be used uninitialized [-Wmaybe-uninitialized]
 1864 |       rtx sub = extract_bit_field_as_subreg (mode1, op0, imode,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
 1865 |                                              bitsize, bitnum);
      |                                              ~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/expmed.cc:1824:19: note: ‘*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’ was declared here
 1824 |   scalar_int_mode imode;
      |                   ^~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gimple-range-gori.cc: In member function ‘void range_def_chain::dump(FILE*, basic_block, const char*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gimple-range-gori.cc:319:19: warning: format not a string literal and no format arguments [-Wformat-security]
---
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
In file included from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-playback.h:31,
                 from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/dummy-frontend.cc:25:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h: In member function ‘virtual bool gcc::jit::recording::type::is_same_type_as(gcc::jit::recording::type*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h:640:20: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  640 |     if ((is_int () && other->is_int () || is_float() && other->is_float())
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
In file included from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/libgccjit.cc:30:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h: In member function ‘virtual bool gcc::jit::recording::type::is_same_type_as(gcc::jit::recording::type*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h:640:20: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  640 |     if ((is_int () && other->is_int () || is_float() && other->is_float())
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/libgccjit.cc: In function ‘gcc_jit_type* gcc_jit_context_new_array_type(gcc_jit_context*, gcc_jit_location*, gcc_jit_type*, long unsigned int)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/libgccjit.cc:807:37: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  807 |   RETURN_NULL_IF_FAIL (num_elements >= 0, ctxt, NULL, "negative size");
---
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
In file included from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-playback.h:31,
                 from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-builtins.cc:24:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h: In member function ‘virtual bool gcc::jit::recording::type::is_same_type_as(gcc::jit::recording::type*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h:640:20: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  640 |     if ((is_int () && other->is_int () || is_float() && other->is_float())
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/omp-builtins.def: At global scope:
./options.h:6899:37: warning: narrowing conversion of ‘global_options.gcc_options::x_flag_openacc’ from ‘int’ to ‘bool’ [-Wnarrowing]
 6899 | #define flag_openacc global_options.x_flag_openacc
      |                      ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-builtins.cc:58:23: note: in definition of macro ‘DEF_BUILTIN’
   58 |   {NAME, CLASS, TYPE, BOTH_P, FALLBACK_P, ATTRS, IMPLICIT},
      |                       ^~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/builtins.def:223:16: note: in expansion of macro ‘flag_openacc’
  223 |                flag_openacc, true, true, ATTRS, false, true)
      |                ^~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/omp-builtins.def:55:1: note: in expansion of macro ‘DEF_GOACC_BUILTIN_COMPILER’
   55 | DEF_GOACC_BUILTIN_COMPILER (BUILT_IN_ACC_ON_DEVICE, "acc_on_device",
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
./options.h:6911:36: warning: narrowing conversion of ‘global_options.gcc_options::x_flag_openmp’ from ‘int’ to ‘bool’ [-Wnarrowing]
 6911 | #define flag_openmp global_options.x_flag_openmp
      |                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-builtins.cc:58:23: note: in definition of macro ‘DEF_BUILTIN’
   58 |   {NAME, CLASS, TYPE, BOTH_P, FALLBACK_P, ATTRS, IMPLICIT},
      |                       ^~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/builtins.def:238:16: note: in expansion of macro ‘flag_openmp’
  238 |                flag_openmp, true, true, ATTRS, false, flag_openmp)
      |                ^~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/omp-builtins.def:72:1: note: in expansion of macro ‘DEF_GOMP_BUILTIN_COMPILER’
   72 | DEF_GOMP_BUILTIN_COMPILER (BUILT_IN_OMP_IS_INITIAL_DEVICE,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
In file included from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-playback.h:31,
                 from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-playback.cc:49:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h: In member function ‘virtual bool gcc::jit::recording::type::is_same_type_as(gcc::jit::recording::type*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h:640:20: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  640 |     if ((is_int () && other->is_int () || is_float() && other->is_float())
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gcc.cc: In function ‘long unsigned int get_random_number()’:
---
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gcc.cc:7930:9: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 7930 |   write (fd, "\n\n", 2);
      |   ~~~~~~^~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gcc.cc: In member function ‘void driver::final_actions() const’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gcc.cc:9307:13: warning: ignoring return value of ‘int truncate(const char*, __off_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 9307 |     truncate(totruncate_file, 0);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/gengtype-lex.l: In function ‘int yylex(const char**)’:
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
---
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/lto/lto-common.cc: In function ‘void lto_resolution_read(splay_tree, FILE*, lto_file*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/lto/lto-common.cc:2091:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 2091 |   fscanf (resolution, " ");   /* Read white space.  */
      |   ~~~~~~~^~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/lto/lto-common.cc:2093:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 2093 |   fread (obj_name, sizeof (char), name_len, resolution);
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/lto/lto-common.cc:2113:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 2113 |   fscanf (resolution, "%u", &num_symbols);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-everything’ may have been intended to silence earlier diagnostics
In file included from /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.cc:32:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h: In member function ‘virtual bool gcc::jit::recording::type::is_same_type_as(gcc::jit::recording::type*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.h:640:20: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  640 |     if ((is_int () && other->is_int () || is_float() && other->is_float())
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.cc: In member function ‘virtual void gcc::jit::recording::memento_of_set_personality_function::replay_into(gcc::jit::replayer*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/gcc/jit/jit-recording.cc:7595:72: warning: unused parameter ‘r’ [-Wunused-parameter]
 7595 | recording::memento_of_set_personality_function::replay_into (replayer *r)
---
Applying io_quotes_use            to linux/blkzoned.h
Applying io_quotes_use            to linux/ipmi.h
Applying io_quotes_use            to linux/psp-dbc.h
Applying io_quotes_use            to linux/bt-bmc.h
Applying io_quotes_use            to linux/tps6594_pfsm.h
Applying io_quotes_use            to linux/cxl_mem.h
Applying io_quotes_use            to linux/wmi.h
Applying io_quotes_use            to linux/auto_fs.h
Applying io_quotes_use            to linux/mmtimer.h
Applying io_quotes_use            to linux/f2fs.h
Applying io_quotes_use            to linux/vhost.h
---
Applying machine_name             to x86_64-linux-gnu/bits/unistd_ext.h
Applying io_quotes_use            to x86_64-linux-gnu/asm/mtrr.h
Applying io_quotes_use            to x86_64-linux-gnu/asm/amd_hsmp.h
Applying machine_name             to openssl/e_os2.h
Applying io_quotes_use            to drm/xe_drm.h
Applying io_quotes_use            to drm/radeon_drm.h
Applying io_quotes_use            to drm/panfrost_drm.h
Applying io_quotes_use            to drm/etnaviv_drm.h
Applying io_quotes_use            to drm/lima_drm.h
Applying io_quotes_use            to drm/qaic_accel.h
Applying io_quotes_use            to drm/vc4_drm.h
Applying io_quotes_use            to drm/i915_drm.h
Applying io_quotes_use            to drm/omap_drm.h
Applying io_quotes_use            to drm/pvr_drm.h
Applying io_quotes_use            to drm/amdgpu_drm.h
Applying io_quotes_use            to drm/vgem_drm.h
Applying io_quotes_use            to drm/msm_drm.h
Applying io_quotes_use            to drm/v3d_drm.h
Applying io_quotes_use            to drm/exynos_drm.h
Applying io_quotes_use            to drm/nouveau_drm.h
Applying io_quotes_use            to drm/drm.h
Applying io_quotes_use            to drm/habanalabs_accel.h
Applying io_quotes_use            to drm/tegra_drm.h
Applying io_quotes_use            to rdma/rdma_user_ioctl.h
cc1: note: self-tests are not enabled in this build
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/c++tools/server.cc: In function ‘void server(bool, int, module_resolver*)’:
/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/src/c++tools/server.cc:620:10: warning: ignoring return value of ‘int pipe(int*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
---
The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args consts/required-consts/collect-in-promoted-const.rs`

error in revision `noopt`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "noopt" "--check-cfg" "cfg(test,FALSE,noopt,opt)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/required-consts/collect-in-promoted-const.noopt" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Copt-level=0"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `Fail::<T>::C` failed
##[error]  --> /checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs:9:19
   |
LL |     const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
   |                   ^^^^^^^^ evaluation panicked: explicit panic
   |
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
  --> /checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs:20:21
   |
LL |         let _val = &Fail::<T>::C;
   |                     ^^^^^^^^^^^^

error[E0080]: evaluation of `Fail::<i32>::C` failed
##[error]  --> /checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs:9:19
   |
LL |     const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
   |                   ^^^^^^^^ evaluation panicked: explicit panic
   |
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
  --> /checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs:20:21
   |
LL |         let _val = &Fail::<T>::C;
   |                     ^^^^^^^^^^^^
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

note: the above error was encountered while instantiating `fn f::<i32>`
  --> /checkout/tests/ui/consts/required-consts/collect-in-promoted-const.rs:25:5
   |
LL |     f::<i32>();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. 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.

5 participants