[PATCH] D133657: [Matrix] Optimize matrix transposes around additions

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 10 22:45:00 PDT 2022


thegameg created this revision.
thegameg added reviewers: fhahn, zjaffal.
thegameg added a project: LLVM.
Herald added subscribers: tschuett, hiraditya.
Herald added a project: All.
thegameg requested review of this revision.

First, sink the transposes to the operands to simplify redudant
ones. Then, lift them to reduce the number of realized transposes.

`(A + B)^T -> A^T + B^T -> (A + B)^T`

See tests for more examples.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133657

Files:
  llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
  llvm/test/Transforms/LowerMatrixIntrinsics/after-transpose-opts.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-backward.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133657.459326.patch
Type: text/x-patch
Size: 20946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220911/e69b3905/attachment-0001.bin>


More information about the llvm-commits mailing list