[MLIR][Vector] Add support for TupleGetOp folding through InsertSlicesOp and ExtractS...
authorAndy Davis <andydavis@google.com>
Tue, 31 Mar 2020 15:21:04 +0000 (08:21 -0700)
committerAndy Davis <andydavis@google.com>
Tue, 31 Mar 2020 15:39:17 +0000 (08:39 -0700)
commit31a346cc35c829e207fbf24d8f8f1ee22ca9f140
tree610b416045a73e9967dd414a601f88c2f5d2634d
parent34756a1c709d1ef0292413cddaeeef8a21ed2124
[MLIR][Vector] Add support for TupleGetOp folding through InsertSlicesOp and ExtractSlicesOp.

Summary:
Add support for TupleGetOp folding through InsertSlicesOp and ExtractSlicesOp.
Vector-to-vector transformations for unrolling and lowering to hardware vectors
can generate chains of structured vector operations (InsertSlicesOp,
ExtractSlicesOp and ShapeCastOp) between the producer of a hardware vector
value and its consumer. Because InsertSlicesOp, ExtractSlicesOp and ShapeCastOp
are structured, we can track the location (tuple index and vector offsets) of
the consumer vector value through the chain of structured operations to the
producer, enabling a much more powerful producer-consumer fowarding of values
through structured ops and tuple, which in turn enables a more powerful
TupleGetOp folding transformation.

Reviewers: nicolasvasilache, aartbik

Reviewed By: aartbik

Subscribers: grosul1, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76889
mlir/include/mlir/Dialect/Vector/VectorUtils.h
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/lib/Dialect/Vector/VectorUtils.cpp
mlir/test/Dialect/Vector/vector-transforms.mlir