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
Add a more thorough target slot analysis #526
Conversation
b1b3c75
to
4262ff7
Compare
4262ff7
to
fea6f58
Compare
fea6f58
to
27035a9
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.
I believe this is sufficient to thread through the pass and achieve the optimal rotations
Yes, this looks really good! Not only because the taget slots match for each of the ops in an unrolled iteration of the box_blur
loop nest, but also because it doesn't seem to flag any "excessive" target slots in hamming_dist
👍
// values. | ||
void visitOperation(Operation *op, ArrayRef<TargetSlotLattice *> operands, | ||
ArrayRef<const TargetSlotLattice *> results) override; | ||
|
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.
Less of a review comment, more a question for my own benefit/understanding of the analysis framework: what's going on here with these empty implementations?
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 believe these hooks are for adding special behavior at control flow entry and exit points, where by default the framework would have no propagation through them. For something like a liveness analysis
I don't specifically know which arguments of the branch ops, for example, are "not forwarded" automatically. But for our purposes for now we're assuming there is no control flow.
e2cfca0
to
989363f
Compare
When running this in debug mode
The logs show:
https://gist.github.com/j2kun/00d819fc79b7e1a24e29b8354c08537f
I believe this is sufficient to thread through the pass and achieve the optimal rotations, however, it will require giving up on the pattern-based implementation because I'm not aware of a way to have tablegen patterns use the results of an analysis pass. I will inquire about it though.