Skip to content

[MidEnd] refactor staticize-memref-layout#683

Open
AkunCube wants to merge 1 commit intobuddy-compiler:mainfrom
AkunCube:refactor-static-memref-layout
Open

[MidEnd] refactor staticize-memref-layout#683
AkunCube wants to merge 1 commit intobuddy-compiler:mainfrom
AkunCube:refactor-static-memref-layout

Conversation

@AkunCube
Copy link
Contributor

Summary

  • I think what this Pass is supposed to do is convert the strides and offsets of memref.reinterpret_cast into IntAttrs. Also, I checked the test case at tests/Conversion/staticize-memref-layout.mlir, and it seems that we can draw on OpWithOffsetSizesAndStridesConstantArgumentFolder from llvm/mlir/include/mlir/Interfaces/ViewLikeInterface.h

  • It works the same as before, with no extra test cases added yet.

@AkunCube AkunCube requested a review from zhanghb97 as a code owner January 29, 2026 15:41
@AkunCube AkunCube changed the title refactor staticize-memref-layout [MidEnd] refactor staticize-memref-layout Jan 29, 2026
@AkunCube AkunCube force-pushed the refactor-static-memref-layout branch from 49ac1d5 to 3671248 Compare January 29, 2026 16:02
@linuxlonelyeagle
Copy link
Member

@zhanghb97 https://github.com/llvm/llvm-project/blob/a17bc05818264a1eef3796cc5b0856a3cd3e808b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp#L2192 .I found a similar pattern in the latest MLIR, so we might be able to remove ReinterpretCastFolder in a future update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants