[Matrix] Update shape propagation to iterate until done.
authorFlorian Hahn <flo@fhahn.com>
Thu, 9 Jan 2020 10:23:34 +0000 (10:23 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 9 Jan 2020 10:52:52 +0000 (10:52 +0000)
commitccf24225e3f2356ebf0e73bb114a831bf1721222
treea855236d435ba070d795fd1b3e81b3bb493c8aeb
parent287a874d1c460302677a1530a75d94bae4d4a348
[Matrix] Update shape propagation to iterate until done.

This patch updates the shape propagation to iterate until no new shape
information is discovered.

As initial seed for the forward propagation, we use the matrix intrinsic
instructions. Both propagateShapeForward and propagateShapeBackward
return new work lists, with the instructions to be used for the next
iteration. When propagating forward, we record all instructions we added
new shape information for. When propagating backward, we record all
users of instructions we added new shape information for.

Reviewers: anemet, Gerolf, reames, hfinkel, andrew.w.kaylor

Reviewed By: anemet

Differential Revision: https://reviews.llvm.org/D70901
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
llvm/test/Transforms/LowerMatrixIntrinsics/propagate-multiple-iterations.ll [new file with mode: 0644]