This is an archive of the discontinued LLVM Phabricator instance.

Apply the permutation map on each affine nest
ClosedPublic

Authored by qaco on Nov 1 2021, 12:23 PM.

Details

Summary

When using -test-loop-permutation="permutation-map=...", applies the permutation map on each affine nest in the function (and not only the first one). If the size of the permutation map and the size of a nest are not consistent, do nothing on this particular nest (instead of making MLIR crash).

Diff Detail

Event Timeline

qaco created this revision.Nov 1 2021, 12:23 PM
qaco requested review of this revision.Nov 1 2021, 12:23 PM
bondhugula accepted this revision.Nov 10 2021, 9:59 PM

Thanks for fixing this. One other comment to make the walk complete.

mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp
49–50

We could actually just use:

getFunction().walk<AffineForOp>([&](AffineForOp forOp) {
  forOps.push_back(forOp);
});
``
This revision is now accepted and ready to land.Nov 10 2021, 9:59 PM
qaco updated this revision to Diff 386473.Nov 11 2021, 3:57 AM

Use getFunction.walk() instead of a for loop on each operation in the function.

qaco added a comment.Nov 11 2021, 3:59 AM

Thanks for fixing this. One other comment to make the walk complete.

Thanks for your comment. Update done.

bondhugula accepted this revision.Nov 11 2021, 4:25 AM
qaco added a comment.Nov 11 2021, 4:35 AM

@bondhugula I can not commit the patch myself (I have not commit access).

@bondhugula I can not commit the patch myself (I have not commit access).

Sorry about the delay - I'm committing this.

@qaco The patch wasn't clang-formatted and had white space issues as well. I can fix these before committing. Can you provide your name/email information that you want on the commit? arc patch isn't able to automatically get it.

qaco added a comment.Dec 4 2021, 1:31 AM

@qaco The patch wasn't clang-formatted and had white space issues as well. I can fix these before committing. Can you provide your name/email information that you want on the commit? arc patch isn't able to automatically get it.

Thank you very much.

My name : Hugo Pompougnac
My email : hugo.pompougnac@inria.fr

This revision was automatically updated to reflect the committed changes.