This is an archive of the discontinued LLVM Phabricator instance.

NFC. Clean up memref utils library
ClosedPublic

Authored by bondhugula on Mar 8 2022, 10:43 PM.

Details

Summary

NFC. Clean up memref utils library. This library had a single function
that was completely misplaced. MemRefUtils is expected to be (also per
its comment) a library providing analysis/transforms utilities on memref
dialect ops or memref types. However, in reality it had a helper that
was depended upon by the MemRef dialect, i.e., it was a helper for the
dialect ops library and couldn't contain anything that itself depends on
the MemRef dialect. Move the single method to the memref dialect that
will now allow actual utilities depending on the memref dialect to be
placed in it.

Put findDealloc in the memref namespace. This is a pure move.

Diff Detail

Event Timeline

bondhugula created this revision.Mar 8 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 10:43 PM
bondhugula requested review of this revision.Mar 8 2022, 10:43 PM

Update missed cmake deps.

rriddle accepted this revision.Mar 9 2022, 12:49 AM
rriddle added inline comments.
mlir/include/mlir/Dialect/MemRef/IR/MemRef.h
49

Can we drop the llvm:: while we are here?

mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
18–19

Can this just be dropped now? It looks like it also gets dropped in the stacked commit.

mlir/lib/Dialect/MemRef/Utils/MemRefUtils.cpp
13

I would drop this comment.

This revision is now accepted and ready to land.Mar 9 2022, 12:49 AM
bondhugula updated this revision to Diff 414044.Mar 9 2022, 2:30 AM
bondhugula marked 3 inline comments as done.

Thanks for the review. Addressed.

This revision was landed with ongoing or failed builds.Mar 9 2022, 2:31 AM
This revision was automatically updated to reflect the committed changes.
mehdi_amini added inline comments.Jan 24 2023, 8:09 PM
mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
18–19

Ping on this? The file still exist and this library is empty.

mehdi_amini added inline comments.Feb 7 2023, 10:10 PM
mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
18–19