[all-commits] [llvm/llvm-project] 778644: [mlir][LLVM] Make `SplitStores` pattern capable of...

Markus Böck via All-commits all-commits at lists.llvm.org
Mon Jul 10 06:28:35 PDT 2023

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

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

  Log Message:
  [mlir][LLVM] Make `SplitStores` pattern capable of writing to sub-aggregates

The pattern was previously only capable of storing into struct fields which are primitive types. If the struct contained a nested struct it immediately aborted the pattern rewrite.

This patch introduces the capability of recursively splitting stores into sub-structs as well. This is achieved by splitting an aggregate sized integer from the original store argument and letting repeated pattern applications further split it into field stores.

Additionally, the pattern is also capable of handling partial writes into aggregates, which is a pattern clang may generate as well. Special care had to be taken to make sure no stores are created that weren't in the original code.

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

More information about the All-commits mailing list