[mlir][linalg] Use getAsOpFoldResult in padding (NFC).
authorTobias Gysi <gysit@google.com>
Mon, 22 Nov 2021 13:15:06 +0000 (13:15 +0000)
committerTobias Gysi <gysit@google.com>
Mon, 22 Nov 2021 13:15:19 +0000 (13:15 +0000)
commit247a1a55eb6a58199006565d594c6f6c6b58b736
tree98e3ba954950bb053a540bff28f91b477c6b8649
parent32c43241e716280d3443d684416826b1e7e5781b
[mlir][linalg] Use getAsOpFoldResult in padding (NFC).

After padding, we introduce a ExtractSliceOp to get the final unpadded result. This revision uses getAsOpFoldResult to compute the size of the unpadded result, which guarantees the result type has a partially static shape if some of the sizes of the unpadded result are statically known. At the moment, we rely on canonicalization to cleanup the types after padding.

Depends On D114085

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D114153
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp