This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Linalg] Canonicalization patterns for linalg.generic.
ClosedPublic

Authored by nirvedhmeshram on Mar 12 2022, 3:57 PM.

Details

Summary

Fold linalg.fill into linalg.generic.
Remove dead arguments used in linalg.generic.

Diff Detail

Event Timeline

nirvedhmeshram created this revision.Mar 12 2022, 3:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2022, 3:57 PM
nirvedhmeshram requested review of this revision.Mar 12 2022, 3:57 PM
ThomasRaoux accepted this revision.Mar 15 2022, 9:25 AM

LGTM modulo couple style comments

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
110

nit: you can just use maps with backquotes to reference the argument

111

should be maps, mlir uses camelBack style for variables.
https://mlir.llvm.org/getting_started/DeveloperGuide/#style-guide

This revision is now accepted and ready to land.Mar 15 2022, 9:25 AM
ThomasRaoux added inline comments.Mar 15 2022, 11:10 AM
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
111

This should be passed by reference or you can use ArrayRef instead.

nirvedhmeshram marked 2 inline comments as done.Mar 15 2022, 11:14 AM

using ArrayRef in helper function

nirvedhmeshram marked an inline comment as done.Mar 15 2022, 11:26 AM
ThomasRaoux accepted this revision.Mar 15 2022, 11:27 AM
This revision was landed with ongoing or failed builds.Mar 15 2022, 11:50 AM
This revision was automatically updated to reflect the committed changes.