- Rewrite vector.transfer_write of vectors with 1 element to memref.store
- Rewrite vector.extract(vector.transfer_read) to memref.load
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Dialect/Vector/scalar-vector-transfer-to-memref.mlir | ||
---|---|---|
99–100 | Note: Turns out there is already a canonicalization pattern that folds this with -canonicalize. No need to implement. |
Comment Actions
Much better, thanks!
Now that I see this, I'd go further: seems to me you could completely avoid worrying about the provenance of the op.
Just extract[0..0] -> memref.store whtever the case and let other patterns kick in.
mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp | ||
---|---|---|
767–770 | Can we change the name here? |
Can we change the name here?
I find the use of "fold" overloaded and misleading here.
RewriteScalarExtractElementOfTransferRead etc ?