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

refactor renumber_ir_elements to allow separate ssa and label changemaps #28279

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

jrevels
Copy link
Member

@jrevels jrevels commented Jul 25, 2018

Refactors this utility function to be a bit nicer when e.g. you want to decide whether your insertions will occur before or after the insertion point. Also adds a test.

@jrevels
Copy link
Member Author

jrevels commented Jul 26, 2018

Will merge tonight assuming no objections

@jrevels jrevels merged commit ec2f2e7 into master Jul 26, 2018
@jrevels jrevels deleted the jr/renumberflexible branch July 26, 2018 23:04
end
end
changemap[end] != 0 || return
(labelchangemap[end] != 0 && ssachangemap[end] != 0) || return
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It seems like this should be || instead of &&?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm. AFAIK normal use would imply that if either changemap has nonzero entries, then the other has nonzero entries as well. Otherwise, it seems like you've passed invalid input to this function or are using it to apply an invalid pass.

That's mainly from my own use cases/use cases in Base, though. Maybe there's a use case where you're building up the label changes and SSA changes in separate calls to renumber_ir_elements. Not sure what kind of pass that makes sense for, though.

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

2 participants