This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Improve support for 0-dimensional Affine Maps.
ClosedPublic

Authored by jbruestle on Apr 15 2020, 11:35 AM.

Details

Summary

Modified AffineMap::get to remove support for the overload which allowed
an ArrayRef of AffineExpr but no context (and gathered the context from a
presumed first entry, resulting in bugs when there were 0 results).

Instead, we support only a ArrayRef and a context, and a version which
takes a single AffineExpr.

Additionally, removed some now needless case logic which previously
special cased which call to AffineMap::get to use.

Diff Detail

Event Timeline

jbruestle created this revision.Apr 15 2020, 11:35 AM
Herald added 1 blocking reviewer(s): rriddle. · View Herald Transcript
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
rriddle accepted this revision.Apr 15 2020, 11:41 AM
rriddle marked an inline comment as done.
rriddle added inline comments.
mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
34

Unrelated to this revision, but I don't see why this ArrayAttr needs to be generated.

mlir/lib/IR/AffineMap.cpp
130

nit: prefer empty instead of size.

mlir/lib/IR/Builders.cpp
300

Is this wrapped at 80 characters?

mlir/lib/Transforms/PipelineDataTransfer.cpp
102

Same here, is this formatted?

This revision is now accepted and ready to land.Apr 15 2020, 11:41 AM
flaub added inline comments.Apr 15 2020, 11:45 AM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
1351

This comment appears obsolete.

Fixes from code review

jbruestle marked 3 inline comments as done.

Another minor issue found during review

Harbormaster failed remote builds in B53399: Diff 257788!
Harbormaster failed remote builds in B53402: Diff 257791!
ftynse accepted this revision.Apr 15 2020, 12:12 PM
ftynse added inline comments.
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
527

Nit: consider adding a message to the assertion, as in assert(condition && "message")

jbruestle marked an inline comment as done.

Having issues with arcanist and git, attempting to resolve.

Trying to fix arc happy

This revision was automatically updated to reflect the committed changes.