[PATCH] D135837: [mlir][MemRef] Simplify extract_strided_metadata(reinterpret_cast)
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 17:56:31 PDT 2022
qcolombet created this revision.
qcolombet added reviewers: nicolasvasilache, chelini.
qcolombet added a project: MLIR.
Herald added subscribers: bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini.
Herald added a project: All.
qcolombet requested review of this revision.
Herald added a subscriber: stephenneuendorffer.
This patch adds a pattern to simplify
base, offset, sizes, strides =
extract_strided_metadata(
reinterpret_cast(src, srcOffset, srcSizes, srcStrides))
Into
base, baseOffset, ... = extract_strided_metadata(src)
offset = baseOffset + srcOffset
sizes = srcSizes
strides = srcStrides
Note: Reinterpret_cast with unranked sources are not simplified since they cannot feed extract_strided_metadata operations.
Note2: This patch is part of a series that replaces the lowering of view like operations in MemRefToLLVM with composable patterns.
Note3: This patch depends on other patches in that series but only for the output of the tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135837
Files:
mlir/lib/Dialect/MemRef/Transforms/SimplifyExtractStridedMetadata.cpp
mlir/test/Dialect/MemRef/simplify-extract-strided-metadata.mlir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135837.467325.patch
Type: text/x-patch
Size: 11834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221013/8da3492d/attachment.bin>
More information about the llvm-commits
mailing list