This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Return new scf.forall handle in fuse_into_containing_op
ClosedPublic

Authored by harsh on May 25 2023, 3:36 AM.

Details

Summary

Since the scf.forall is now consumed by the fuse into
containing op, we need to return a handle to the new scf.forall.
This patch does that and also ensures that the new bbArg
added to the scf.forall is used in its body.

Diff Detail

Event Timeline

harsh created this revision.May 25 2023, 3:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 3:36 AM
harsh requested review of this revision.May 25 2023, 3:36 AM
ThomasRaoux accepted this revision.May 25 2023, 7:56 AM
ThomasRaoux added a subscriber: ThomasRaoux.

Looks good!

This revision is now accepted and ready to land.May 25 2023, 7:56 AM
harsh added a comment.May 25 2023, 9:33 AM

Looks good!

Thanks!

ftynse added a subscriber: ftynse.May 26 2023, 2:17 AM

This (and the previous change) breaks transform composability in a quite annoying way. Since the loop handle is now consumed, this invalidates all handles pointing inside the loop. So if we wanted to tile an operation the second time after fusion, we can't anymore (without searching for it again) because we have destroyed the handle to it.

This also did not update the documentation that keeps saying the operand is only read.

I will be undoing the "consume" part in https://reviews.llvm.org/D151555, but please update the op documentation to reflect changes made here and in the previous commit.

harsh added a comment.May 26 2023, 5:53 AM

I will be undoing the "consume" part in https://reviews.llvm.org/D151555, but please update the op documentation to reflect changes made here and in the previous commit.

Thanks! I am out of the office this week but will get to this next Friday.

harsh added a comment.Jun 2 2023, 4:23 PM

Here is the PR for the updated documentation - https://reviews.llvm.org/D152044. Please take a look when you get a chance. Thanks!