Skip to content

Fix CopyPropagation regression (2) - #46462

Merged
bors merged 1 commit into
rust-lang:masterfrom
sinkuu:copyprop_reg2
Dec 4, 2017
Merged

Fix CopyPropagation regression (2)#46462
bors merged 1 commit into
rust-lang:masterfrom
sinkuu:copyprop_reg2

Conversation

@sinkuu

@sinkuusinkuu commented Dec 3, 2017

Copy link
Copy Markdown
Contributor

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

fnfoo(mutx: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

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

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

@arielb1

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Dec 3, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 17d6631 has been approved by arielb1

@kennytmkennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 3, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Dec 3, 2017
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.
@frewsxcvfrewsxcv mentioned this pull request Dec 3, 2017
bors added a commit that referenced this pull request Dec 3, 2017
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:masterDec 4, 2017
@sinkuu
sinkuu deleted the copyprop_reg2 branch December 4, 2017 07:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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.

6 participants

@sinkuu@rust-highfive@arielb1@bors@kennytm@nikomatsakis