This is an archive of the discontinued LLVM Phabricator instance.

Add a method to build affine maps with zero or more results.
ClosedPublic

Authored by ulysseB on Mar 31 2020, 2:36 AM.

Details

Summary

The commit provides a single method to build affine maps with zero or more
results. Users of mlir::AffineMap previously had to dispatch between two methods
depending on the number of results.

At the same time, this commit fixes the method for building affine map with zero
results that was previously ignoring its symbolCount argument.

Diff Detail

Event Timeline

ulysseB created this revision.Mar 31 2020, 2:36 AM
Herald added a project: Restricted Project. · View Herald Transcript
ulysseB edited reviewers, added: ftynse, nicolasvasilache; removed: rriddle.Mar 31 2020, 2:39 AM
ftynse accepted this revision.Mar 31 2020, 2:49 AM
ftynse marked an inline comment as done.
ftynse added inline comments.
mlir/include/mlir/IR/AffineMap.h
52

Nit: please use /// for documenting public methods

mlir/lib/IR/MLIRContext.cpp
633

ouch...

bondhugula accepted this revision.Mar 31 2020, 2:54 AM
bondhugula added a subscriber: bondhugula.

Thanks for fixing this. In fact, I had review comments along the lines you address on an earlier patch that introduced these but looks like they didn't get in. (For consistency, we do need the ability to create 0 result maps that have an arbitrary number of dimensions and symbols, which your patch addresses.)

mlir/include/mlir/IR/AffineMap.h
52

Doc comment ///
symbolCount -> symbolCount symbols

57

Doc comment ///

Nit: -> 'to the given results, where the number of results can be zero.'

ulysseB updated this revision to Diff 253833.Mar 31 2020, 4:10 AM

Fix comments for AffineMap::get.

ulysseB marked 3 inline comments as done.Mar 31 2020, 4:11 AM
nicolasvasilache accepted this revision.Mar 31 2020, 5:59 AM
rriddle accepted this revision.Mar 31 2020, 11:24 AM
This revision is now accepted and ready to land.Mar 31 2020, 11:24 AM
This revision was automatically updated to reflect the committed changes.