This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Generalize/complete getEnclosingAffineForIfOps utility
ClosedPublic

Authored by bondhugula on Aug 21 2022, 8:19 AM.

Details

Summary

Rename/generalize getEnclosingAffineForIfOps -> getEnclosingAffineOps.
The utility was originally written only for affine.for ops and then
extended for affine.if as well. It wasn't however updated when
affine.parallel was introduced -- in most cases, analysis has been used
in the presence of affine.for/if but not post parallelization. Extend
utility to also support affine.parallel ops; this allows future changes
to enable affine analysis and opts in the presence of affine.parallel
ops. Fix related stale comments.

This is NFC for all use cases in tree.

Change an associated assert to a utility failure.

Diff Detail

Event Timeline

bondhugula created this revision.Aug 21 2022, 8:19 AM
bondhugula requested review of this revision.Aug 21 2022, 8:19 AM
bondhugula edited the summary of this revision. (Show Details)

Update commit summary.

Groverkss added inline comments.Aug 21 2022, 8:47 AM
mlir/lib/Dialect/Affine/Analysis/Utils.cpp
52–54

This comment should be updated since it also collects affine.parallel ops.

bondhugula marked an inline comment as done.

Address review comment.

ftynse accepted this revision.Aug 24 2022, 1:23 AM
This revision is now accepted and ready to land.Aug 24 2022, 1:23 AM