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

Fix CopyPropagation regression (2) #46462

Merged
merged 1 commit into from Dec 4, 2017

Conversation

Projects
None yet
6 participants
@sinkuu
Contributor

sinkuu commented Dec 3, 2017

Remaining part of MIR copyprop regression by (I think) #45380, which I missed in #45753.

fn foo(mut x: i32) -> i32 {
    let y = x;
    x = 123; // `x` is assigned only once in MIR, but cannot be propagated to `y`
    y
}

So any assignment to an argument cannot be propagated.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Dec 3, 2017

Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

Collaborator

rust-highfive commented Dec 3, 2017

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 3, 2017

Contributor

@bors r+ rollup

Contributor

arielb1 commented Dec 3, 2017

@bors r+ rollup

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 3, 2017

Contributor

📌 Commit 17d6631 has been approved by arielb1

Contributor

bors commented Dec 3, 2017

📌 Commit 17d6631 has been approved by arielb1

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Dec 3, 2017

Rollup merge of rust-lang#46462 - sinkuu:copyprop_reg2, r=arielb1
Fix CopyPropagation regression (2)

Remaining part of MIR copyprop regression by (I think) rust-lang#45380, which I missed in rust-lang#45753.

```rust
fn foo(mut x: i32) -> i32 {
    let y = x;
    x = 123; // `x` is assigned only once in MIR, but cannot be propagated to `y`
    y
}
```

So any assignment to an argument cannot be propagated.

bors added a commit that referenced this pull request Dec 3, 2017

Auto merge of #46482 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests

- Successful merges: #45957, #46260, #46432, #46442, #46454, #46462, #46465, #46473
- Failed merges:

@bors bors merged commit 17d6631 into rust-lang:master Dec 4, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@sinkuu sinkuu deleted the sinkuu:copyprop_reg2 branch Dec 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment