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: Fully disable ConstProp. #109942

Closed
wants to merge 1 commit into from
Closed

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Apr 4, 2023

@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 Apr 4, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@cjgillot
Copy link
Contributor Author

cjgillot commented Apr 4, 2023

@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 4, 2023
@bors
Copy link
Contributor

bors commented Apr 4, 2023

⌛ Trying commit c5bd169 with merge a5eaddaa5e49226dee71db86495550afa28fc25a...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
28 
- note: erroneous constant used
-   --> $DIR/defaults-not-assumed-fail.rs:33:5
-    |
- LL |     assert_eq!(<() as Tr>::B, 0);    // causes the error above
-    |
-    = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
37 error: aborting due to previous error
---
To only update this specific test, also pass `--test-args associated-consts/defaults-not-assumed-fail.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/associated-consts/defaults-not-assumed-fail.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-consts/defaults-not-assumed-fail" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-consts/defaults-not-assumed-fail/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `<() as Tr>::B` failed
  --> fake-test-src-base/associated-consts/defaults-not-assumed-fail.rs:8:19
   |
LL |     const B: u8 = Self::A + 1;
   |                   ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
note: erroneous constant used
  --> fake-test-src-base/associated-consts/defaults-not-assumed-fail.rs:33:16
   |
   |
LL |     assert_eq!(<() as Tr>::B, 0);    // causes the error above

note: erroneous constant used
  --> fake-test-src-base/associated-consts/defaults-not-assumed-fail.rs:33:5
   |
   |
LL |     assert_eq!(<() as Tr>::B, 0);    // causes the error above
   |
   = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant used
note: erroneous constant used
  --> fake-test-src-base/associated-consts/defaults-not-assumed-fail.rs:33:5
   |
LL |     assert_eq!(<() as Tr>::B, 0);    // causes the error above
   |
   = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error
---

---- [ui] tests/ui/consts/const-err-late.rs stdout ----
diff of stderr:

28 LL |     black_box((S::<i32>::FOO, S::<u32>::FOO));
30 
- note: erroneous constant used
-   --> $DIR/const-err-late.rs:19:16
-    |
-    |
- LL |     black_box((S::<i32>::FOO, S::<u32>::FOO));
- 
37 error: aborting due to 2 previous errors
38 
39 For more information about this error, try `rustc --explain E0080`.
---
To only update this specific test, also pass `--test-args consts/const-err-late.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-err-late.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-err-late" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-err-late/auxiliary" "-C" "overflow-checks=on"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `S::<i32>::FOO` failed
  --> fake-test-src-base/consts/const-err-late.rs:13:21
   |
LL |     const FOO: u8 = [5u8][1];
   |                     ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
note: erroneous constant used
  --> fake-test-src-base/consts/const-err-late.rs:19:16
   |
   |
LL |     black_box((S::<i32>::FOO, S::<u32>::FOO)); //~ constant


error[E0080]: evaluation of `S::<u32>::FOO` failed
  --> fake-test-src-base/consts/const-err-late.rs:13:21
   |
LL |     const FOO: u8 = [5u8][1];
   |                     ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
note: erroneous constant used
  --> fake-test-src-base/consts/const-err-late.rs:19:31
   |
   |
LL |     black_box((S::<i32>::FOO, S::<u32>::FOO)); //~ constant

note: erroneous constant used
  --> fake-test-src-base/consts/const-err-late.rs:19:16
   |
   |
LL |     black_box((S::<i32>::FOO, S::<u32>::FOO)); //~ constant

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0080`.
---
28 
- note: erroneous constant used
-   --> $DIR/issue-44578.rs:25:20
-    |
- LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
-    |
-    = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
37 error: aborting due to previous error
---
To only update this specific test, also pass `--test-args consts/const-eval/issue-44578.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-eval/issue-44578.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/issue-44578" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/issue-44578/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
  --> fake-test-src-base/consts/const-eval/issue-44578.rs:13:24
   |
LL |     const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize]; //~ERROR evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
note: erroneous constant used
  --> fake-test-src-base/consts/const-eval/issue-44578.rs:25:20
   |
   |
LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);

note: erroneous constant used
  --> fake-test-src-base/consts/const-eval/issue-44578.rs:25:20
   |
   |
LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant used
note: erroneous constant used
  --> fake-test-src-base/consts/const-eval/issue-44578.rs:25:20
   |
LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error
---

---- [ui] tests/ui/consts/miri_unleashed/assoc_const_2.rs stdout ----
diff of stderr:

16 LL |     let y = <String as Bar<String>>::F;
18 
- note: erroneous constant used
-   --> $DIR/assoc_const_2.rs:27:13
-    |
-    |
- LL |     let y = <String as Bar<String>>::F;
- 
25 error: aborting due to previous error
26 
27 For more information about this error, try `rustc --explain E0080`.
27 For more information about this error, try `rustc --explain E0080`.


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const_2/assoc_const_2.stderr
To only update this specific test, also pass `--test-args consts/miri_unleashed/assoc_const_2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/miri_unleashed/assoc_const_2.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const_2" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const_2/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `<std::string::String as Bar<std::string::String>>::F` failed
  --> fake-test-src-base/consts/miri_unleashed/assoc_const_2.rs:10:20
   |
LL |     const F: u32 = 100 / U::X; //~ ERROR evaluation of `<std::string::String as Bar<std::string::String>>::F` failed
   |                    ^^^^^^^^^^ attempt to divide `100_u32` by zero
note: erroneous constant used
  --> fake-test-src-base/consts/miri_unleashed/assoc_const_2.rs:27:13
   |
   |
LL |     let y = <String as Bar<String>>::F; //~ constant

note: erroneous constant used
  --> fake-test-src-base/consts/miri_unleashed/assoc_const_2.rs:27:13
   |
   |
LL |     let y = <String as Bar<String>>::F; //~ constant

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
For more information about this error, try `rustc --explain E0080`.
------------------------------------------


---- [ui] tests/ui/consts/miri_unleashed/assoc_const.rs stdout ----
diff of stderr:

25 LL |     let y = <String as Bar<Vec<u32>, String>>::F;
27 
- note: erroneous constant used
-   --> $DIR/assoc_const.rs:29:13
-    |
-    |
- LL |     let y = <String as Bar<Vec<u32>, String>>::F;
- 
34 warning: skipping const checks
35    |
36 help: skipping check that does not even have a feature gate
---
To only update this specific test, also pass `--test-args consts/miri_unleashed/assoc_const.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/miri_unleashed/assoc_const.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const/auxiliary" "-Zunleash-the-miri-inside-of-you"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `<std::string::String as Bar<std::vec::Vec<u32>, std::string::String>>::F` failed
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:490:1
   |
   = note: calling non-const function `<Vec<u32> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:490:1
note: inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:490:1
note: inside `<String as Bar<Vec<u32>, String>>::F`
  --> fake-test-src-base/consts/miri_unleashed/assoc_const.rs:12:31
   |
LL |     const F: u32 = (U::X, 42).1;

note: erroneous constant used
  --> fake-test-src-base/consts/miri_unleashed/assoc_const.rs:29:13
   |
   |
LL |     let y = <String as Bar<Vec<u32>, String>>::F; //~ constant

note: erroneous constant used
  --> fake-test-src-base/consts/miri_unleashed/assoc_const.rs:29:13
   |
   |
LL |     let y = <String as Bar<Vec<u32>, String>>::F; //~ constant

warning: skipping const checks
   |
help: skipping check that does not even have a feature gate
help: skipping check that does not even have a feature gate
  --> fake-test-src-base/consts/miri_unleashed/assoc_const.rs:12:20
   |
LL |     const F: u32 = (U::X, 42).1;

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0080`.
For more information about this error, try `rustc --explain E0080`.
------------------------------------------


---- [ui] tests/ui/consts/uninhabited-const-issue-61744.rs stdout ----
diff of stderr:

657 LL |     dbg!(i32::CONSTANT);
659 
- note: erroneous constant used
-   --> $DIR/uninhabited-const-issue-61744.rs:18:10
-    |
-    |
- LL |     dbg!(i32::CONSTANT);
- 
666 error: aborting due to previous error
667 
668 For more information about this error, try `rustc --explain E0080`.
---
To only update this specific test, also pass `--test-args consts/uninhabited-const-issue-61744.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/uninhabited-const-issue-61744.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/uninhabited-const-issue-61744" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/uninhabited-const-issue-61744/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `<i32 as Const>::CONSTANT` failed
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
   |     ^^^^^^^^^^^^^^^^^^ reached the configured maximum number of stack frames
   |
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
LL |     fake_type()
LL |     fake_type()
   |     ^^^^^^^^^^^
note: inside `fake_type::<!>`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:4:5
   |
LL |     hint_unreachable() //~ ERROR evaluation of `<i32 as Const>::CONSTANT` failed
note: inside `hint_unreachable`
  --> fake-test-src-base/consts/uninhabited-const-issue-61744.rs:8:5
   |
---
27 
- note: erroneous constant used
-   --> $DIR/issue-55878.rs:7:26
-    |
- LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-    |
-    = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
36 error: aborting due to previous error
---
To only update this specific test, also pass `--test-args limits/issue-55878.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/limits/issue-55878.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/limits/issue-55878" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/limits/issue-55878/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: values of the type `[u8; usize::MAX]` are too big for the current architecture
  --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:309:5
   |
note: inside `std::mem::size_of::<[u8; usize::MAX]>`
  --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:309:5
  --> fake-test-src-base/limits/issue-55878.rs:7:26
   |
   |
LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());

note: erroneous constant used
  --> fake-test-src-base/limits/issue-55878.rs:7:26
   |
   |
LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant used
note: erroneous constant used
  --> fake-test-src-base/limits/issue-55878.rs:7:26
   |
LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

@bors
Copy link
Contributor

bors commented Apr 4, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a5eaddaa5e49226dee71db86495550afa28fc25a): 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)
2.1% [0.2%, 10.5%] 112
Regressions ❌
(secondary)
7.5% [0.2%, 29.6%] 49
Improvements ✅
(primary)
-0.6% [-1.7%, -0.2%] 16
Improvements ✅
(secondary)
-1.0% [-2.0%, -0.1%] 39
All ❌✅ (primary) 1.8% [-1.7%, 10.5%] 128

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)
4.0% [0.7%, 8.7%] 20
Regressions ❌
(secondary)
23.4% [1.6%, 75.8%] 13
Improvements ✅
(primary)
-2.7% [-4.6%, -1.4%] 4
Improvements ✅
(secondary)
-3.8% [-4.8%, -2.6%] 4
All ❌✅ (primary) 2.9% [-4.6%, 8.7%] 24

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)
3.3% [0.6%, 11.0%] 81
Regressions ❌
(secondary)
11.5% [1.3%, 34.5%] 31
Improvements ✅
(primary)
-2.6% [-4.2%, -1.6%] 9
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) 2.7% [-4.2%, 11.0%] 90

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

cjgillot commented Apr 5, 2023

For opt builds (1st order) : we have an average +0.9% regression, up to 3% (excluding extreme results like 20% for keccak and 10% for a stress test). The regressions are in LLVM (more optimization work), monomorphization (more code to monomorphize and constants to evaluate).

For check builds (2nd order) : the results pretty much balance improvement and regression.
Note a 2% regression in bootstrap timing.

I tend to conclude that:

Do this answer your questions @oli-obk?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 5, 2023

It does, thank you!

@oli-obk oli-obk closed this Apr 5, 2023
@cjgillot cjgillot deleted the no-const-prop branch April 5, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants