Skip to content

[nfc] [util] add util to check if an instruction dominates all uses of a value #30464

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

Closed

Conversation

zoecarver
Copy link
Contributor

This patch adds a utility function dominatesAllUses to check if an instruction dominates all uses of a value. NFC. Used in #30463.

/// \param a the instruction who's expected to dominate.
/// \param b the instruction who's uses are expected to be dominated.
/// \returns true if all uses of "b" are dominated by "a". Otherwise, false.
bool swift::dominatesAllUses(SILInstruction *a, SILValue b) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should take an optional dominanceInfo argument.

@shahmishal
Copy link
Member

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

  • How to change the base branch: (Link)
  • More detail about the branch update: (Link)

@zoecarver zoecarver closed this Oct 2, 2020
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.

2 participants