-
Notifications
You must be signed in to change notification settings - Fork 305
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
[Arc] Keep just one parameter if it's given multiple times #7284
Conversation
This can be generalized to remove any repeated pattern in the input, what do you think? |
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.
Yes, I think this is a useful canonicalization regardless of how much you can save in vector packing. 👍
It can reduce the use-count of values and thus enable more applications of your other canonicalization pattern, for example.
cb7bafb
to
ab92a68
Compare
ab92a68
to
c046812
Compare
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.
This is a very useful canonicalization! LGTM, besides a minor comment about SmallVector
maybe not being necessary.
c046812
to
a38f140
Compare
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!
This pull request adds a new canonical form for the arc.vectorize operation.
Given the following IR
We can remove the repeated input to simplify it as:
This can reduce the time of the unpacking of vector elements.