-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[VPlan] Add incoming_[blocks,values] iterators to VPPhiAccessors (NFC) #138472
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
Conversation
Add a VPPhiAccessors class to provide interfaces to access incoming values and blocks, with corresponding iterators. The first user is VPWidenPhiRecipe, with the other phi-like recipes following soon. This will also be used to verify def-use chains where users are phi-like recipes, simplifying llvm#124838.
[VPlan] Use VPPhiAccessors for VPIRPhi. astOf
Add iterators for incoming values, blocks and values and blocks combined, to encourage processing values and their corresponding blocks together.
…ecipes. (#124838) Update the verifier to verify dominance for incoming values for phi-like recipes. The defining recipe must dominate the incoming block for the incoming value. Builds on top of llvm/llvm-project#138472 to retrieve incoming values & corresponding blocks for phi-like recipes. PR: llvm/llvm-project#124838
…vm#124838) Update the verifier to verify dominance for incoming values for phi-like recipes. The defining recipe must dominate the incoming block for the incoming value. Builds on top of llvm#138472 to retrieve incoming values & corresponding blocks for phi-like recipes. PR: llvm#124838
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the PR title need updated? VPPhiAccessors was already added in #129388, this is adding more methods to it right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the PR title need updated? VPPhiAccessors was already added in #129388, this is adding more methods to it right?
Yep, updated, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
if (!EdgeMask) { | ||
assert(In == 0 && "Both null and non-null edge masks found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there's not an easy way to preserve this assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope unfortunately not :(
for (const auto &[IncomingVPV, IncomingVPBB] : | ||
Phi->incoming_values_and_blocks()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not majorly important but if you wanted to preserve the error message you could do const auto &[Idx, IncomingVPV, IncomingVPBB] : enumerate(Phi->incoming_values(), Phi->incoming_blocks())
Reverse ping! |
…essors (NFC) (#138472) Add 3 new iterator ranges to VPPhiAccessors * incoming_values(): returns a range over the incoming values of a phi * incoming_blocks(): returns a range over the incoming blocks of a phi * incoming_values_and_blocks: returns a range over pairs of incoming values and blocks. Depends on llvm/llvm-project#124838. PR: llvm/llvm-project#138472
Add 3 new iterator ranges to VPPhiAccessors
values of a phi
blocks of a phi
incoming values and blocks.
Depends on #124838.