This is an archive of the discontinued LLVM Phabricator instance.

[mlir][SCF] Generalize AffineMinSCFCanonicalization to min/max ops
ClosedPublic

Authored by springerm on Aug 12 2021, 8:27 PM.

Details

Summary
  • Add support for affine.max ops to SCF loop peeling pattern.
  • Add support for affine.max ops to AffineMinSCFCanonicalizationPattern.
  • Rename AffineMinSCFCanonicalizationPattern to AffineOpSCFCanonicalizationPattern.
  • Rename AffineMinSCFCanonicalization pass to SCFAffineOpCanonicalization.

Depends On D107732

Diff Detail

Event Timeline

springerm created this revision.Aug 12 2021, 8:27 PM
springerm requested review of this revision.Aug 12 2021, 8:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2021, 8:27 PM
ftynse accepted this revision.Aug 24 2021, 4:26 AM
ftynse added inline comments.
mlir/include/mlir/Dialect/SCF/Transforms.h
52–56
mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
207
319

Nit: update minOpUb to opBound here? Maybe also spell out the max case?

mlir/test/Dialect/SCF/canonicalize-affine-op.mlir
32

Could we also have a test where the canonicalization does not kick in, preferably an adjacent one, e.g., using %c3.

This revision is now accepted and ready to land.Aug 24 2021, 4:26 AM
springerm updated this revision to Diff 368526.Aug 24 2021, 6:30 PM
springerm marked 4 inline comments as done.

address comments

This revision was landed with ongoing or failed builds.Aug 24 2021, 6:41 PM
This revision was automatically updated to reflect the committed changes.