[mlir][linalg] Add constant padding helper to PadTensorOp
authorMatthias Springer <springerm@google.com>
Mon, 14 Jun 2021 00:43:02 +0000 (09:43 +0900)
committerMatthias Springer <springerm@google.com>
Mon, 14 Jun 2021 00:44:39 +0000 (09:44 +0900)
commitbf5d3092f8557301f2e322349880f9f86c884e87
tree534c4595096045a1c62857ec781974d80e98e88a
parent594febf05b41a09409cf3145c6fa7635e9957334
[mlir][linalg] Add constant padding helper to PadTensorOp

* Add a helper function that returns the constant padding value (if applicable).
* Remove existing getConstantYieldValueFromBlock function, which does almost the same.
* Adapted from D103243.

Differential Revision: https://reviews.llvm.org/D104004
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp