This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Tighten computation of inferred SubView result type.
ClosedPublic

Authored by nicolasvasilache on Feb 11 2021, 2:11 PM.

Details

Summary

The AffineMap in the MemRef inferred by SubViewOp may have uncompressed symbols which result in type mismatch on otherwise unused symbols. Make the computation of the AffineMap compress those unused symbols which results in better canonical types.
Additionally, improve the error message to report which inferred type was expected.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Feb 11 2021, 2:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2021, 2:11 PM
ThomasRaoux accepted this revision.Feb 11 2021, 2:18 PM
ThomasRaoux added inline comments.
mlir/lib/IR/AffineMap.cpp
548–551

Should be const llvm::SmallDenseSet<unsigned> &unusedDims

This revision is now accepted and ready to land.Feb 11 2021, 2:18 PM
nicolasvasilache marked an inline comment as done.Feb 11 2021, 2:30 PM
This revision was landed with ongoing or failed builds.Feb 11 2021, 2:44 PM
This revision was automatically updated to reflect the committed changes.