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

fix pred_count accounting in SimplifyCfg #36959

Merged
merged 3 commits into from
Oct 6, 2016

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Oct 4, 2016

r? @eddyb

@arielb1 arielb1 changed the title fix 2 bugs in SimplifyCfg fix pred_count accounting in SimplifyCfg Oct 4, 2016
self.pred_count[*start] -= 1;

if self.pred_count[*start] == 1 {
self.pred_count[*start] = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Took me a while to get that this is because *start becomes dead here and thus shouldn't count.
There should be a comment making this (or whatever the correct explanation) clear to future readers.

@eddyb
Copy link
Member

eddyb commented Oct 4, 2016

r=me with a comment added.

@arielb1 arielb1 force-pushed the simplify-cfg-fixes branch from babdff1 to 44ac016 Compare October 4, 2016 14:08
@arielb1
Copy link
Contributor Author

arielb1 commented Oct 4, 2016

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Oct 4, 2016

📌 Commit 44ac016 has been approved by eddyb

// goto -> bb1;
// }
//
// bb1: {
Copy link
Member

Choose a reason for hiding this comment

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

Nice! 😍

@arielb1
Copy link
Contributor Author

arielb1 commented Oct 4, 2016

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Oct 4, 2016

📌 Commit bfdf437 has been approved by eddyb

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Oct 6, 2016
fix pred_count accounting in SimplifyCfg

r? @eddyb
bors added a commit that referenced this pull request Oct 6, 2016
@bors bors merged commit bfdf437 into rust-lang:master Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants