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

[const-prop] Support Rvalue::{Ref,Len} and Deref #61532

Merged
merged 5 commits into from
Jun 7, 2019

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented Jun 5, 2019

Also fixes an ICE I found in testing.

r? @oli-obk

The final commit is just for a perf run. I'll remove it after that is completed.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2019
@rust-highfive

This comment has been minimized.

src/librustc_mir/transform/const_prop.rs Outdated Show resolved Hide resolved
src/librustc_mir/interpret/place.rs Show resolved Hide resolved
src/librustc_mir/transform/const_prop.rs Outdated Show resolved Hide resolved
@wesleywiser wesleywiser force-pushed the const_prop_more branch 2 times, most recently from 174518c to a1aa0ee Compare June 5, 2019 23:49
@wesleywiser
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Jun 6, 2019

⌛ Trying commit a1aa0ee29240a4737054013910acff3998648ad9 with merge 78f9292a51479346f19ce2c71bdb0db551ce8fe5...

@bors
Copy link
Contributor

bors commented Jun 6, 2019

☀️ Try build successful - checks-travis
Build commit: 78f9292a51479346f19ce2c71bdb0db551ce8fe5

@oli-obk
Copy link
Contributor

oli-obk commented Jun 6, 2019

@rust-timer build 78f9292a51479346f19ce2c71bdb0db551ce8fe5

@rust-timer
Copy link
Collaborator

Success: Queued 78f9292a51479346f19ce2c71bdb0db551ce8fe5 with parent 7cdaffd, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 78f9292a51479346f19ce2c71bdb0db551ce8fe5, comparison URL.

@oli-obk
Copy link
Contributor

oli-obk commented Jun 6, 2019

Awesome improvements, sprinkled with some small regressions. The worst is the 3-4% clean incremental regression for unicode_normalization. Can you try compiling that crate with optimizations and use https://github.com/rust-lang/measureme to compare with the master branch?

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:04c19f40:start=1559824493424994042,finish=1559824494238364180,duration=813370138
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[01:00:06] 
[01:00:06] ---- [ui] ui/consts/const-eval/promoted_errors.rs stdout ----
[01:00:06] diff of stderr:
[01:00:06] 
[01:00:06] 16 LL |     println!("{}", 1/(1-1));
[01:00:06] 18 
[01:00:06] + warning: this expression will panic at runtime
[01:00:06] +   --> $DIR/promoted_errors.rs:9:20
[01:00:06] +    |
[01:00:06] +    |
[01:00:06] + LL |     println!("{}", 1/(1-1));
[01:00:06] + 
[01:00:06] 19 warning: attempt to divide by zero
[01:00:06] 20   --> $DIR/promoted_errors.rs:11:14
[01:00:06] 21    |
[01:00:06] 21    |
[01:00:06] 
[01:00:06] 33    |
[01:00:06] 34 LL |     println!("{}", 1/(false as u32));
[01:00:06] + 
[01:00:06] + warning: this expression will panic at runtime
[01:00:06] +   --> $DIR/promoted_errors.rs:14:20
[01:00:06] +    |
[01:00:06] +    |
[01:00:06] + LL |     println!("{}", 1/(false as u32));
[01:00:06] 36 
[01:00:06] 37 warning: attempt to divide by zero
[01:00:06] 38   --> $DIR/promoted_errors.rs:16:14
[01:00:06] 
[01:00:06] 
[01:00:06] 
[01:00:06] The actual stderr differed from the expected stderr.
[01:00:06] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/promoted_errors/promoted_errors.stderr
[01:00:06] To update references, rerun the tests and pass the `--bless` flag
[01:00:06] To only update this specific test, also pass `--test-args consts/const-eval/promoted_errors.rs`
[01:00:06] error: 1 errors occurred comparing output.
[01:00:06] status: exit code: 0
[01:00:06] status: exit code: 0
[01:00:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-eval/promoted_errors.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/promoted_errors" "-Crpath" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-O" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/promoted_errors/auxiliary" "-A" "unused"
[01:00:06] ------------------------------------------
[01:00:06] 
[01:00:06] ------------------------------------------
[01:00:06] stderr:
---
[01:00:06] 
[01:00:06] warning: attempt to divide by zero
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:9:20
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(1-1));
[01:00:06] 
[01:00:06] warning: this expression will panic at runtime
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:9:20
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(1-1));
[01:00:06] 
[01:00:06] warning: attempt to divide by zero
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:11:14
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     let _x = 1/(1-1);
[01:00:06] 
[01:00:06] warning: this expression will panic at runtime
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:11:14
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     let _x = 1/(1-1);
[01:00:06] 
[01:00:06] warning: attempt to divide by zero
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:14:20
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(false as u32));
[01:00:06] 
[01:00:06] warning: this expression will panic at runtime
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:14:20
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(false as u32));
[01:00:06] 
[01:00:06] warning: attempt to divide by zero
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:16:14
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     let _x = 1/(false as u32);
[01:00:06] 
[01:00:06] warning: this expression will panic at runtime
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:16:14
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     let _x = 1/(false as u32);
[01:00:06] 
[01:00:06] warning: reaching this expression at runtime will panic or abort
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:14:20
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(false as u32));
[01:00:06] 
[01:00:06] warning: reaching this expression at runtime will panic or abort
[01:00:06]   --> /checkout/src/test/ui/consts/const-eval/promoted_errors.rs:9:20
[01:00:06]    |
[01:00:06]    |
[01:00:06] LL |     println!("{}", 1/(1-1));
[01:00:06] 
[01:00:06] 
[01:00:06] ------------------------------------------
[01:00:06] 
---
[01:00:06] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:521:22
[01:00:06] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:00:06] 
[01:00:06] 
[01:00:06] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:00:06] 
[01:00:06] 
[01:00:06] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:00:06] Build completed unsuccessfully in 0:55:16
---
travis_time:end:0b168085:start=1559828124888391600,finish=1559828124895270240,duration=6878640
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0aa476c8
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:06026370
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@wesleywiser
Copy link
Member Author

@bors r=oli-obk

See here

@bors
Copy link
Contributor

bors commented Jun 7, 2019

📌 Commit 459e37b has been approved by oli-obk

@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 Jun 7, 2019
@bors
Copy link
Contributor

bors commented Jun 7, 2019

⌛ Testing commit 459e37b with merge 5ca98982963a5e10ec21d76d608e9bfe47771c3a...

@bors
Copy link
Contributor

bors commented Jun 7, 2019

💔 Test failed - checks-travis

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 7, 2019
@rust-highfive
Copy link
Collaborator

The job test-various of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:46:37] test time::tests::system_time_elapsed ... ok
[01:46:37] test time::tests::system_time_math ... ok
[01:46:37] test thread::tests::test_park_timeout_unpark_called_other_thread ... ok
[01:46:45] test sync::mpsc::tests::stress_recv_timeout_two_threads ... ok
[01:47:34] test process::tests::uid_to_root_fails ... test process::tests::uid_to_root_fails has been running for over 60 seconds
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 7, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Jun 7, 2019

@bors retry (timeout)

@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 Jun 7, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 7, 2019
[const-prop] Support Rvalue::{Ref,Len} and Deref

Also fixes an ICE I found in testing.

r? @oli-obk

~~The final commit is just for a perf run. I'll remove it after that is completed.~~
bors added a commit that referenced this pull request Jun 7, 2019
Rollup of 4 pull requests

Successful merges:

 - #61332 (Remove asterisk suggestion for move errors in borrowck)
 - #61532 ([const-prop] Support Rvalue::{Ref,Len} and Deref)
 - #61586 (ci: Disable LLVM/debug assertions for asmjs builder)
 - #61599 (libcore/pin: Minor grammar corrections for module documentation)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Jun 7, 2019
[const-prop] Support Rvalue::{Ref,Len} and Deref

Also fixes an ICE I found in testing.

r? @oli-obk

~~The final commit is just for a perf run. I'll remove it after that is completed.~~
bors added a commit that referenced this pull request Jun 7, 2019
Rollup of 7 pull requests

Successful merges:

 - #61332 (Remove asterisk suggestion for move errors in borrowck)
 - #61532 ([const-prop] Support Rvalue::{Ref,Len} and Deref)
 - #61586 (ci: Disable LLVM/debug assertions for asmjs builder)
 - #61599 (libcore/pin: Minor grammar corrections for module documentation)
 - #61603 (Increases heap size available during testing for SGX)
 - #61605 (Fix slice const generic length display)
 - #61618 (make the backtrace field of EvalError private)

Failed merges:

r? @ghost
@bors bors merged commit 459e37b into rust-lang:master Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants