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

move Deaggregate pass to post_borrowck_cleanup #73656

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 23, 2020

Reopen of #71946

Only the second commit is from this PR, the other commit is a bugfix that's in the process of getting merged. I'll rebase once that's done

In #70073 MIR pass handling got reorganized, but with the goal of not changing behavior (except for disabling some optimizations on opt-level = 0). But there we realized that the Deaggregator pass, while conceptually more of a "cleanup" pass (and one that should be run before optimizations), was run in the middle of the optimization chain. Likely this is an accident of history, so I suggest we try and clean that up by making it a proper cleanup pass.

This does change mir-opt output, because deaggregation now runs before const-prop instead of after.

r? @wesleywiser @rust-lang/wg-mir-opt

cc @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2020
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, 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.
##[section]Starting: Linux mingw-check
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 4'
Agent machine name: 'fv-az578'
Current agent version: '2.170.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200614.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200614.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.171.1)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/aa4d8044-2e30-4618-9ee1-e8793bb1a81c.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73656/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73656/merge:refs/remotes/pull/73656/merge
---
 ---> a9ec21d337b3
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> 5ff2c13d8dba
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            python3 ../x.py doc --stage 0 src/libstd &&            /scripts/validate-toolstate.sh
 ---> 6b931e755c7e
Successfully built 6b931e755c7e
Successfully tagged rust-ci:latest
Built container sha256:6b931e755c7ea1f69816640eb9df74fafd40a545d0e5aa8341d35009dabb0f3c
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking chalk-engine v0.11.0
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
configure: llvm.assertions      := True
configure: rust.dist-src        := False
configure: build.submodules     := False
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
Hugepagesize:       2048 kB
DirectMap4k:      118720 kB
DirectMap2M:     4075520 kB
DirectMap1G:     5242880 kB
+ python3 ../x.py test src/tools/expand-yaml-anchors
Ensuring the YAML anchors in the GitHub Actions config were expanded
Ensuring the YAML anchors in the GitHub Actions config were expanded
Building stage0 tool expand-yaml-anchors (x86_64-unknown-linux-gnu)
---
   Compiling linked-hash-map v0.5.2
   Compiling lazy_static v1.4.0
   Compiling yaml-rust v0.4.3
   Compiling quote v1.0.2
   Compiling thiserror-impl v1.0.5
   Compiling thiserror v1.0.5
   Compiling yaml-merge-keys v0.4.0
   Compiling expand-yaml-anchors v0.1.0 (/checkout/src/tools/expand-yaml-anchors)
Build completed successfully in 0:00:23
+ python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu
    Finished dev [unoptimized] target(s) in 0.17s
Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> i686-pc-windows-gnu)
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking chalk-engine v0.11.0
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
Done!
some tidy checks failed


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
Build completed unsuccessfully in 0:00:29
Build completed unsuccessfully in 0:00:29
== clock drift check ==
  local time: Tue Jun 23 13:49:08 UTC 2020
  network time: Tue, 23 Jun 2020 13:49:08 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73656/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73656/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3561) (python)
##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-8 of your PR failed (pretty log, 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.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 21'
Agent machine name: 'fv-az578'
Current agent version: '2.170.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200614.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200614.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.171.1)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/77457833-c869-4c0e-b464-77b085ec296b.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73656/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73656/merge:refs/remotes/pull/73656/merge
---
 ---> 31fea614d2f3
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> 4195cadf126d
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 4e90f6b48f05
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> dfa0a356d899
---
Set({"src/librustc_parse_format"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_passes"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_plugin_impl"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_privacy"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_query_system"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_save_analysis"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_serialize"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_session"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_span"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
---
Set({"src/librustc_parse_format"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_passes"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_plugin_impl"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_privacy"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_query_system"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_save_analysis"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_serialize"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_session"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
Set({"src/librustc_span"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
---
   Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
   Compiling chalk-engine v0.11.0
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling chalk-solve v0.11.0
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
   Compiling rustc_span v0.0.0 (/checkout/src/librustc_span)
error: expected one of `!` or `[`, found `{`
  --> src/librustc_span/source_map.rs:43:62
   |
43 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, HashStable_Generic)]
   |                                                              ^^^^^^^^^^^^^^^^^^ expected one of `!` or `[`
error: proc-macro derive produced unparseable tokens
  --> src/librustc_span/source_map.rs:43:62
   |
   |
43 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, HashStable_Generic)]

error: expected one of `!` or `[`, found `{`
 --> src/librustc_span/edition.rs:9:10
  |
---
    |
108 | #[derive(HashStable_Generic)]
    |          ^^^^^^^^^^^^^^^^^^

error: expected one of `(` or `<`, found `{`
   --> src/librustc_span/symbol.rs:22:1
22  | /     symbols! {
22  | /     symbols! {
23  | |         // After modifying this list adjust `is_special`, `is_used_keyword`/`is_unused_keyword`,
24  | |         // this should be rarely necessary though if the keywords are kept in alphabetic order.
25  | |         Keywords {
849 | |         }
850 | |     }
    | |     ^
    | |     |
    | |     |
    | |     expected one of `(` or `<`
    | |     while parsing this item list starting here
    | |_____the item list ends here
    | 
   ::: /checkout/src/librustc_macros/src/lib.rs:20:1
    |
    |
20  |     / pub fn symbols(input: TokenStream) -> TokenStream {
21  |     |     symbols::symbols(input)
    |     |_- in this expansion of `symbols!`

error: expected one of `!` or `[`, found `{`
   --> src/librustc_span/symbol.rs:852:27
   --> src/librustc_span/symbol.rs:852:27
    |
852 | #[derive(Copy, Clone, Eq, HashStable_Generic)]
    |                           ^^^^^^^^^^^^^^^^^^ expected one of `!` or `[`
error: proc-macro derive produced unparseable tokens
   --> src/librustc_span/symbol.rs:852:27
    |
    |
852 | #[derive(Copy, Clone, Eq, HashStable_Generic)]

error: expected one of `!` or `[`, found `{`
    --> src/librustc_span/symbol.rs:22:1
     |
     |
22   | / symbols! {
23   | |     // After modifying this list adjust `is_special`, `is_used_keyword`/`is_unused_keyword`,
24   | |     // this should be rarely necessary though if the keywords are kept in alphabetic order.
25   | |     Keywords {
849  | |     }
850  | | }
     | | ^
     | | |
---

error: expected one of `!` or `[`, found `{`
    --> src/librustc_span/symbol.rs:22:1
     |
22   | / symbols! {
23   | |     // After modifying this list adjust `is_special`, `is_used_keyword`/`is_unused_keyword`,
24   | |     // this should be rarely necessary though if the keywords are kept in alphabetic order.
25   | |     Keywords {
849  | |     }
850  | | }
     | | ^
     | | |
---
     |
1018 | #[derive(HashStable_Generic)]
     |          ^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `super::kw::MacroRules`
    --> src/librustc_span/symbol.rs:1208:13
     |
1208 |     pub use super::kw::MacroRules as macro_rules;
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MacroRules` in `symbol::kw`
error[E0425]: cannot find value `rust_2015_preview` in module `sym`
  --> src/librustc_span/edition.rs:51:42
   |
51 |             Edition::Edition2015 => sym::rust_2015_preview,
---
    |
135 |                 || expn_data.kind == ExpnKind::Macro(MacroKind::Bang, sym::include)
    |                                                                            ^^^^^^^ not found in `sym`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    |
    |
171 |                 dollar_crate_name: kw::DollarCrate,
    |                                        ^^^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    |
    |
313 |                         dollar_crate_name: kw::DollarCrate,
    |                                                ^^^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    |
    |
333 |                         dollar_crate_name: kw::DollarCrate,
    |                                                ^^^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    |
    |
349 |                 dollar_crate_name: kw::DollarCrate,
    |                                        ^^^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    |
    |
372 |                 .take_while(|scdata| scdata.dollar_crate_name == kw::DollarCrate)
    |                                                                      ^^^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `PathRoot` in module `kw`
    |
    |
743 |             ExpnKind::Root => kw::PathRoot.to_string(),
    |                                   ^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `Invalid` in module `kw`
   --> src/librustc_span/symbol.rs:873:36
    |
873 |         Ident::with_dummy_span(kw::Invalid)
    |                                    ^^^^^^^ not found in `kw`
help: consider importing this unit variant
    |
5   | use core::num::dec2flt::parse::ParseResult::Invalid;
    |
    |

error[E0425]: cannot find value `DollarCrate` in module `kw`
    --> src/librustc_span/symbol.rs:1008:35
     |
1008 |             if self.symbol == kw::DollarCrate {
     |                                   ^^^^^^^^^^^ not found in `kw`
error[E0425]: cannot find value `digits_array` in this scope
    --> src/librustc_span/symbol.rs:1214:42
     |
     |
1214 |             if let Option::Some(&sym_) = digits_array.get(idx) {

error[E0425]: cannot find value `Async` in module `kw`
    --> src/librustc_span/symbol.rs:1224:21
     |
     |
1224 |         self >= kw::Async && self <= kw::Dyn
     |                     ^^^^^ not found in `kw`
help: consider importing this unit variant
     |
5    | use crate::hygiene::DesugaringKind::Async;
     |
     |

error[E0425]: cannot find value `Dyn` in module `kw`
    --> src/librustc_span/symbol.rs:1224:42
     |
1224 |         self >= kw::Async && self <= kw::Dyn
     |                                          ^^^ not found in `kw`
error[E0425]: cannot find value `Try` in module `kw`
    --> src/librustc_span/symbol.rs:1228:21
     |
     |
1228 |         self == kw::Try
     |                     ^^^ not found in `kw`
error[E0425]: cannot find value `Union` in module `kw`
    --> src/librustc_span/symbol.rs:1233:21
     |
     |
1233 |         self <= kw::Union
     |                     ^^^^^ not found in `kw`
error[E0425]: cannot find value `Super` in module `kw`
    --> src/librustc_span/symbol.rs:1238:21
     |
     |
1238 |         self == kw::Super
     |                     ^^^^^ not found in `kw`

error[E0425]: cannot find value `SelfLower` in module `kw`
    --> src/librustc_span/symbol.rs:1239:28
     |
1239 |             || self == kw::SelfLower
     |                            ^^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `SelfUpper` in module `kw`
    --> src/librustc_span/symbol.rs:1240:28
     |
1240 |             || self == kw::SelfUpper
     |                            ^^^^^^^^^ not found in `kw`
error[E0425]: cannot find value `Crate` in module `kw`
    --> src/librustc_span/symbol.rs:1241:28
     |
     |
1241 |             || self == kw::Crate
     |                            ^^^^^ not found in `kw`

error[E0425]: cannot find value `PathRoot` in module `kw`
    --> src/librustc_span/symbol.rs:1242:28
     |
1242 |             || self == kw::PathRoot
     |                            ^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `DollarCrate` in module `kw`
    --> src/librustc_span/symbol.rs:1243:28
     |
1243 |             || self == kw::DollarCrate
     |                            ^^^^^^^^^^^ not found in `kw`
error[E0425]: cannot find value `True` in module `kw`
    --> src/librustc_span/symbol.rs:1248:21
     |
     |
1248 |         self == kw::True || self == kw::False
     |                     ^^^^ not found in `kw`
error[E0425]: cannot find value `False` in module `kw`
    --> src/librustc_span/symbol.rs:1248:41
     |
     |
1248 |         self == kw::True || self == kw::False
     |                                         ^^^^^ not found in `kw`

error[E0425]: cannot find value `Invalid` in module `kw`
    --> src/librustc_span/symbol.rs:1253:21
     |
1253 |         self != kw::Invalid && self != kw::Underscore && !self.is_path_segment_keyword()
     |                     ^^^^^^^ not found in `kw`
help: consider importing this unit variant
     |
5    | use core::num::dec2flt::parse::ParseResult::Invalid;
     |
     |

error[E0425]: cannot find value `Underscore` in module `kw`
    --> src/librustc_span/symbol.rs:1253:44
     |
1253 |         self != kw::Invalid && self != kw::Underscore && !self.is_path_segment_keyword()
     |                                            ^^^^^^^^^^ not found in `kw`
error[E0425]: cannot find value `Underscore` in module `kw`
    --> src/librustc_span/symbol.rs:1261:26
     |
     |
1261 |         self.name <= kw::Underscore
     |                          ^^^^^^^^^^ not found in `kw`
error[E0425]: cannot find value `As` in module `kw`
    --> src/librustc_span/symbol.rs:1267:26
     |
     |
1267 |         self.name >= kw::As && self.name <= kw::While
     |                          ^^ not found in `kw`
error[E0425]: cannot find value `While` in module `kw`
    --> src/librustc_span/symbol.rs:1267:49
     |
     |
1267 |         self.name >= kw::As && self.name <= kw::While
     |                                                 ^^^^^ not found in `kw`

error[E0425]: cannot find value `Abstract` in module `kw`
    --> src/librustc_span/symbol.rs:1274:26
     |
1274 |         self.name >= kw::Abstract && self.name <= kw::Yield
     |                          ^^^^^^^^ not found in `kw`

error[E0425]: cannot find value `Yield` in module `kw`
    --> src/librustc_span/symbol.rs:1274:55
     |
1274 |         self.name >= kw::Abstract && self.name <= kw::Yield
     |                                                       ^^^^^ not found in `kw`
error[E0425]: cannot find value `allow_internal_unstable_backcompat_hack` in module `sym`
   --> src/librustc_span/lib.rs:471:53
    |
    |
471 |                 .any(|&f| f == feature || f == sym::allow_internal_unstable_backcompat_hack)

error: unused import: `super::Symbol`
    --> src/librustc_span/symbol.rs:1191:9
     |
---

error[E0599]: no function or associated item named `fresh` found for struct `symbol::Interner` in the current scope
    --> src/librustc_span/lib.rs:77:58
     |
77   |             symbol_interner: Lock::new(symbol::Interner::fresh()),
     |                                                          ^^^^^ function or associated item not found in `symbol::Interner`
    ::: src/librustc_span/symbol.rs:1143:1
     |
1143 | pub struct Interner {
1143 | pub struct Interner {
     | ------------------- function or associated item `fresh` not found for this
error[E0599]: no method named `hash_stable` found for struct `hygiene::ExpnData` in the current scope
    --> src/librustc_span/lib.rs:1811:37
     |
     |
1811 |                 expn_id.expn_data().hash_stable(ctx, &mut hasher);
     | 
    ::: src/librustc_span/hygiene.rs:645:1
     |
645  | pub struct ExpnData {
645  | pub struct ExpnData {
     | ------------------- method `hash_stable` not found for this
     |
     = help: items from traits can only be used if the trait is implemented and in scope
     = note: the following trait defines an item `hash_stable`, perhaps you need to implement it:
             candidate #1: `rustc_data_structures::stable_hasher::HashStable`
error: aborting due to 65 previous errors

Some errors have detailed explanations: E0425, E0432, E0599.
For more information about an error, try `rustc --explain E0425`.
---
  local time: Tue Jun 23 16:59:03 UTC 2020
  network time: Tue, 23 Jun 2020 16:59:03 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73656/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73656/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3642) (python)
##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@RalfJung
Copy link
Member

Oh so the reference bug also interacts with this? Or is that just to avoid conflicts?

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 23, 2020

just to avoid conflicts, the bugfix changes MIR that this PR also changes.

@oli-obk

This comment has been minimized.

@bors

This comment has been minimized.

@oli-obk

This comment has been minimized.

}

bb3: {
discriminant(_6) = 0; // scope 1 at $DIR/funky_arms.rs:17:18: 17:38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wesleywiser the bug used to be that this (the last assignment to _6 in this MIR) assigned a constant to _6 and didn't erase it at the end of the block.

StorageLive(_18); // scope 2 at $DIR/funky_arms.rs:25:51: 25:54
_18 = _2; // scope 2 at $DIR/funky_arms.rs:25:51: 25:54
StorageLive(_19); // scope 2 at $DIR/funky_arms.rs:25:56: 25:60
_19 = _6; // scope 2 at $DIR/funky_arms.rs:25:56: 25:60
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

causing it to be read here, even though both assignments flow into this block

@rust-highfive

This comment has been minimized.

Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 28, 2020
…leywiser

Const prop: erase all block-only locals at the end of every block

I messed up this erasure in rust-lang#73656 (comment). I think it is too fragile to have the previous scheme. Let's benchmark the new scheme and see what happens.

r? @wesleywiser

cc @felix91gr
@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 6, 2020

@wesleywiser this is ready for review again

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 14, 2020

ping @wesleywiser I did a rebase as discussed on zulip and it still applies cleanly.

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question

@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2020
@oli-obk

This comment has been minimized.

@bors

This comment has been minimized.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 11, 2020
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2020
…ath, r=wesleywiser

Check whether locals are too large instead of whether accesses into them are too large

Essentially this stops const prop from attempting to optimize

```rust
let mut x = [0_u8; 5000];
x[42] = 3;
```

I don't expect this to be a perf improvement without rust-lang#73656 (which is also where the lack of this PR will be a perf regression).

r? @wesleywiser
@bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 11, 2020
@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 11, 2020

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Aug 11, 2020

📌 Commit 307d0d8 has been approved by wesleywiser

@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 Aug 11, 2020
@bors
Copy link
Contributor

bors commented Aug 11, 2020

⌛ Testing commit 307d0d8 with merge cbe7c5c...

@bors
Copy link
Contributor

bors commented Aug 11, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: wesleywiser
Pushing cbe7c5c to master...

@ecstatic-morse
Copy link
Contributor

This resulted in small regression to instruction counts on full and incr-full benchmarks. Was this expected? Normally, a regression of this magnitude would be ignored, but this PR seems like cleanup, and it might indicate that we should be de-aggregating more often.

@oli-obk oli-obk deleted the deaggregate-is-cleanup branch March 16, 2021 12:14
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.