[PATCH] D136483: [mlir][MemRefToLLVM] Reuse existing lowering for collaspe/expand_shape

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 10:26:44 PDT 2022


qcolombet added a comment.

Hi ,

> Could you comment (potentially the commit description) why the length of tests in the generated IR increases significantly after what is said to be a simplification? Were the previous tests just checking a subset of IR operations that were actually generated?

Good point, I haven't repeated the message explaining that from https://reviews.llvm.org/D136377.

Here is the relevant part:

  This patch is NFC in spirit but not in practice because subview [here expand/collapse_shape] gets lowered into reinterpret_cast(extract_strided_metadata, <some math>) which lowers in two memref descriptors (one for reinterpert_cast and one for extract_strided_metadata), which creates some noise of the form: extractvalue(unrealized_cast(extractvalue[0]))[0] that is currently not simplified within MLIR but that is really just noop in that case.

Note: This patch builds on top of https://reviews.llvm.org/D136377, so it suffers the same problem as that one, i.e., the `affine-to-std` and `arith-to-llvm` dependencies.

As far as the term simplification goes, I should really say expansion. I'll fix that.

Cheers,
-Quentin


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136483/new/

https://reviews.llvm.org/D136483



More information about the llvm-commits mailing list