[all-commits] [llvm/llvm-project] 6e7bbd: [mlir] Add offset/stride helper functions to Offse...

Matthias Springer via All-commits all-commits at lists.llvm.org
Mon Jun 7 04:12:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e7bbdd6e7f7649bccc4f981520ed916e21d7058
      https://github.com/llvm/llvm-project/commit/6e7bbdd6e7f7649bccc4f981520ed916e21d7058
  Author: Matthias Springer <springerm at google.com>
  Date:   2021-06-07 (Mon, 07 Jun 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
    M mlir/include/mlir/Interfaces/ViewLikeInterface.h
    M mlir/include/mlir/Interfaces/ViewLikeInterface.td
    M mlir/lib/Dialect/StandardOps/IR/Ops.cpp

  Log Message:
  -----------
  [mlir] Add offset/stride helper functions to OffsetSizeAndStrideOpInterface

* 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.

Differential Revision: https://reviews.llvm.org/D103763




More information about the All-commits mailing list