[mlir][MemRef] Change the anchor point of a reshapeLikeOp pattern
Essentially, this patches changes the anchor point of the `extract_strided_metadata(reshapeLikeOp)` pattern from `extract_strided_metadata` to `reshapeLikeOp`. In details, this means that instead of replacing: ``` base, offset, sizes, strides = extract_strided_metadata(reshapeLikeOp(src)) ``` With ``` base, offset = extract_strided_metadata(src) sizes = <some math> strides = <some math> ``` We replace only the reshapeLikeOp part and connect it back with a reinterpret_cast: ``` val = reshapeLikeOp(src) ``` => ``` base, offset, ... = extract_strided_metadata(src) sizes = <some math> strides = <some math> val = reinterpret_cast base, offset, sizes, strides Differential Revision: https://reviews.llvm.org/D136386
Loading
Please sign in to comment