Skip to content

fix pred_count accounting in SimplifyCfg #36959

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

Merged
merged 3 commits into from
Oct 6, 2016

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Oct 4, 2016

r? @eddyb

Unverified

This user has not yet uploaded their public signing key.
@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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@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
Collaborator

bors commented Oct 4, 2016

📌 Commit 44ac016 has been approved by eddyb

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
// 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
Collaborator

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix pred_count accounting in SimplifyCfg

r? @eddyb
bors added a commit that referenced this pull request Oct 6, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Rollup of 15 pull requests

- Successful merges: #36726, #36832, #36909, #36930, #36932, #36957, #36959, #36960, #36962, #36965, #36966, #36967, #36972, #36974, #36977
- Failed merges:
@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.

None yet

3 participants