This is an archive of the discontinued LLVM Phabricator instance.

[mlir][memref] Use folded composed affine apply ops in FoldMemRefAliasOps
ClosedPublic

Authored by nicolasvasilache on Mar 21 2023, 4:44 AM.

Details

Summary

Creating maximally folded and composd affine.apply operation during
FoldMemRefAliasOps composes better with other transformations without having
to interleave canonicalization passes.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Mar 21 2023, 4:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 4:44 AM

Note the automatic d -> s promotion due to affine scoping rules.
I would personally prefer to trigger the promotion explicitly rather than have it apply everywhere all the time but this has not been a hard blocker recently.

bondhugula accepted this revision.Mar 21 2023, 6:45 PM

LGTM

mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
14–16

Merge this block of includes with the one below; no need to keep them separate unless this block only has Passes.h.

22

This include isn't needed I think.

77

Include a short code comment here along the lines you have in the commit summary.

This revision is now accepted and ready to land.Mar 21 2023, 6:45 PM
nicolasvasilache marked 2 inline comments as done.
nicolasvasilache edited the summary of this revision. (Show Details)

Address and rebase

nicolasvasilache marked an inline comment as done.Mar 21 2023, 10:25 PM
This revision was landed with ongoing or failed builds.Mar 21 2023, 10:27 PM
This revision was automatically updated to reflect the committed changes.