[Mlir-commits] [mlir] Folding extract_strided_metadata input into reinterpret_cast on constant layout (PR #134845)
Matthias Springer
llvmlistbot at llvm.org
Tue Apr 8 05:59:46 PDT 2025
================
@@ -1440,6 +1440,9 @@ def MemRef_ReinterpretCastOp
SmallVector<OpFoldResult> getConstifiedMixedStrides();
/// Similar to `getConstifiedMixedSizes` but for the offset.
OpFoldResult getConstifiedMixedOffset();
+ /// Returns true if the reinterpret cast operation's offset, stride, and
+ /// size are all constant.
+ bool isLayoutConstant();
----------------
matthias-springer wrote:
The name here is misleading. "Layout" refers to offset and strides only. Maybe rename to `hasConstantOffsetSizesStrides`.
https://github.com/llvm/llvm-project/pull/134845
More information about the Mlir-commits
mailing list