[all-commits] [llvm/llvm-project] efc290: [mlir][affine] More efficient `makeComposedFolded....

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jun 22 01:47:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: efc290ce9c2b85bbd66ebc9ea43986fe89cbff15
      https://github.com/llvm/llvm-project/commit/efc290ce9c2b85bbd66ebc9ea43986fe89cbff15
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-06-22 (Thu, 22 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
    M mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Tensor/Transforms/ExtractSliceFromReshapeUtils.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferSplitRewritePatterns.cpp

  Log Message:
  -----------
  [mlir][affine] More efficient `makeComposedFolded...` helpers

The old code used to materialize constants as ops, immediately folded them into the resulting affine map and then deleted the constant ops again. Instead, directly fold the attributes into the affine map. Furthermore, all helpers accept `OpFoldResult` instead of `Value` now. This makes the code at call sites more efficient, because it is no longer necessary to materialize a `Value`, just to be able to use these helper functions.

Note: The API has changed (accepts OpFoldResult instead of Value), otherwise this change is NFC.

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




More information about the All-commits mailing list