[mlir] [VectorOps] Progressive lowering of vector.broadcast
authoraartbik <ajcbik@google.com>
Thu, 16 Apr 2020 23:01:42 +0000 (16:01 -0700)
committeraartbik <ajcbik@google.com>
Fri, 17 Apr 2020 04:02:27 +0000 (21:02 -0700)
commit186709c6e0bd1025fb578e43911325530cb97f09
tree9c36e97c37111873985eea786f5ec1ebe1788d1d
parentcc0ec3fdb9d1dccfc6bf6d511163cb595c8760eb
[mlir] [VectorOps] Progressive lowering of vector.broadcast

Summary:
Rather than having a full, recursive, lowering of vector.broadcast
to LLVM IR, it is much more elegant to have a progressive lowering
of each vector.broadcast into a lower dimensional vector.broadcast,
until only elementary vector operations remain. This results
in more elegant, step-wise code, that is easier to understand.
Also makes some optimizations in the generated code.

Reviewers: nicolasvasilache, mehdi_amini, andydavis1, grosul1

Reviewed By: nicolasvasilache

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78071
mlir/include/mlir/Dialect/Vector/VectorOps.h
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
mlir/test/Dialect/Vector/vector-contract-transforms.mlir