[all-commits] [llvm/llvm-project] 67c351: [mlir][LLVM] Make `SplitIntegerStores` capable of ...

Markus Böck via All-commits all-commits at lists.llvm.org
Thu Jul 6 06:55:03 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67c351f648e09256827b1e826e2bf80083279049
  Author: Markus Böck <markus.bock+llvm at nextsilicon.com>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.td
    M mlir/include/mlir/Dialect/LLVMIR/Transforms/TypeConsistency.h
    M mlir/lib/Dialect/LLVMIR/Transforms/TypeConsistency.cpp
    M mlir/test/Dialect/LLVMIR/type-consistency.mlir

  Log Message:
  [mlir][LLVM] Make `SplitIntegerStores` capable of splitting vectors as well

The original plan was to turn this into its own pattern, but one of the difficulties was deeming when splitting the vector is required.
`SplitIntegerStores` essentially already did that by checking for field overlap.
Therefore, it was renamed to `SplitStores` and extended to splitting stores with values of vector and integer type.

The vector splitting is done in a simple manner by simply using `extractelement` to get each vector element. Subsequent pattern applications are responsible for further cleaning up the output and making it type-consistent.

Worst case, if the code cannot be transformed into a type-consistent form (due to e.g. the code explicitly doing partial writes to elements or similar), we might needlessly do a vector split.

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

More information about the All-commits mailing list