diff options
author | Quentin Colombet <quentin.colombet@gmail.com> | 2022-10-20 22:18:58 +0000 |
---|---|---|
committer | Quentin Colombet <quentin.colombet@gmail.com> | 2022-11-14 18:56:35 +0000 |
commit | d665448a7f3ad88fac6c852703cf1f7baeb9200b (patch) | |
tree | 02cb5a84c7be15322104d38a28d244d29c6de17a /llvm/lib/CodeGen/MachineCSE.cpp | |
parent | 41783666e4ae958e85db8e7ef04bea4ab909ab9e (diff) | |
download | llvm-d665448a7f3ad88fac6c852703cf1f7baeb9200b.zip llvm-d665448a7f3ad88fac6c852703cf1f7baeb9200b.tar.gz llvm-d665448a7f3ad88fac6c852703cf1f7baeb9200b.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
0 files changed, 0 insertions, 0 deletions