[all-commits] [llvm/llvm-project] 4d21da: [mlir] Return vectorized values instead of replaci...

Max191 via All-commits all-commits at lists.llvm.org
Tue Jun 24 12:07:03 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d21da002a056c64231fb89ee9e4eba90080e9bb
      https://github.com/llvm/llvm-project/commit/4d21da002a056c64231fb89ee9e4eba90080e9bb
  Author: Max191 <44243577+Max191 at users.noreply.github.com>
  Date:   2025-06-24 (Tue, 24 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp

  Log Message:
  -----------
  [mlir] Return vectorized values instead of replacing (#144158)

Updates the linalg::vectorize function to return a
`FailureOr<VectorizationResult>` containing the values to replace the
original operation, instead of directly replacing the original
operation. This aligns better with the style of transforms used with the
TilingInterface, and gives more control to users over the lowering,
since it allows for additional transformation of the IR before
replacement.

There was already a `VectorizationResult` defined, which was used for
the internal vectorize implementation using `CustomVectorizationHook`s,
so the old struct is renamed to `VectorizationHookResult`.

Note for integration: The replacement of the original operation is now
the responsibility of the caller, so wherever `linalg::vectorize` is
used, the caller must also do
`rewriter.replaceOp(vectorizeResults->replacements)`.

---------

Signed-off-by: Max Dawkins <max.dawkins at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list