This is an archive of the discontinued LLVM Phabricator instance.

[mlir:Analysis] Move the LoopAnalysis library to Dialect/Affine/Analysis
ClosedPublic

Authored by rriddle on Jan 14 2022, 12:07 PM.

Details

Summary

The current state of the top level Analysis/ directory is that it contains two libraries;
a generic Analysis library (free from dialect dependencies), and a LoopAnalysis library
that contains various analysis utilities that originated from Affine loop transformations.
This commit moves the LoopAnalysis to the more appropriate home of Dialect/Affine/Analysis/,
given the use and intention of the majority of the code within it. After the move, if there
are generic utilities that would fit better in the top-level Analysis/ directory, we can move
them.

Diff Detail

Event Timeline

rriddle created this revision.Jan 14 2022, 12:07 PM
rriddle requested review of this revision.Jan 14 2022, 12:07 PM
rriddle updated this revision to Diff 400104.Jan 14 2022, 12:12 PM

This looks good and was long overdue. getMemRefSizeInBytes and matchReduction appear to be the only two things from Utils.h and LoopAnalysis.h that should stay in MLIRAnalysis. It'll be good to avoid two moves and keep these functions there?

rriddle updated this revision to Diff 400252.Jan 14 2022, 11:40 PM

This looks good and was long overdue. getMemRefSizeInBytes and matchReduction appear to be the only two things from Utils.h and LoopAnalysis.h that should stay in MLIRAnalysis. It'll be good to avoid two moves and keep these functions there?

I moved matchReduction back to Analysis. getMemRefSizeInBytes looks very similar to ShapedType::getSizeInBits, it'd probably be best to converge there and just remove getMemRefSizeInBytes altogether (but that would be better served with a different patch).

bondhugula accepted this revision.Jan 15 2022, 12:32 AM

This looks good and was long overdue. getMemRefSizeInBytes and matchReduction appear to be the only two things from Utils.h and LoopAnalysis.h that should stay in MLIRAnalysis. It'll be good to avoid two moves and keep these functions there?

I moved matchReduction back to Analysis. getMemRefSizeInBytes looks very similar to ShapedType::getSizeInBits, it'd probably be best to converge there and just remove getMemRefSizeInBytes altogether (but that would be better served with a different patch).

LGTM - sounds fine either way. It's just those two functions.

This revision is now accepted and ready to land.Jan 15 2022, 12:32 AM
This revision was landed with ongoing or failed builds.Jan 18 2022, 10:28 AM
This revision was automatically updated to reflect the committed changes.