This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add offset/stride helper functions to OffsetSizeAndStrideOpInterface
ClosedPublic

Authored by springerm on Jun 6 2021, 4:06 AM.

Details

Summary
  • Add hasUnitStride and hasZeroOffset to OffsetSizeAndStrideOpInterface. These functions are useful for various patterns. E.g., some vectorization patterns apply only for tensor ops with zero offsets and/or unit stride.
  • Add getConstantIntValue and isEqualConstantInt helper functions, which are useful for implementing the two above functions, as well as various patterns.

Diff Detail