This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Affine] Move/expose hasNoInterveningEffect
ClosedPublic

Authored by makslevental on Sep 21 2022, 10:15 AM.

Details

Summary

I would like to expose Dialect/Affine/Utils/Utils.cpp#hasNoInterveningEffect for downstream use (particular use case is a lazy implementation of forwardStoreToLoad in CIRCT). This exposes hasNoInterveningEffect and instantiates for the necessary types.

Diff Detail

Event Timeline

makslevental created this revision.Sep 21 2022, 10:15 AM
makslevental requested review of this revision.Sep 21 2022, 10:15 AM
bondhugula requested changes to this revision.EditedSep 22 2022, 12:00 PM

I think we shouldn't put so much C++ code in the headers. Just leave these in the C++ file and explicitly instantiate right below (in the C++ file) for the necessary memOp types.

This revision now requires changes to proceed.Sep 22 2022, 12:00 PM
makslevental edited the summary of this revision. (Show Details)

I think we shouldn't put so much C++ code in the headers. Just leave these in the C++ file and explicitly instantiate right below (in the C++ file) for the necessary memOp types.

I've made the changes as I think you intended (I might be wrong). I've also tested with the downstream code (so this formulation is suitable for my needs).

bondhugula accepted this revision.Sep 28 2022, 8:02 PM
bondhugula added inline comments.
mlir/include/mlir/Dialect/Affine/Utils.h
323

The doc comment should come here since this method has been exposed.

mlir/lib/Dialect/Affine/Utils/Utils.cpp
660

Move doc comment to the declaration.

This revision is now accepted and ready to land.Sep 28 2022, 8:02 PM
makslevental marked an inline comment as done.
makslevental marked an inline comment as done.
This revision was landed with ongoing or failed builds.Sep 29 2022, 9:10 AM
This revision was automatically updated to reflect the committed changes.