[Mlir-commits] [mlir] [mlir][MemRef] Changed AssumeAlignment into a ViewLikeOp (PR #139521)
Shay Kleiman
llvmlistbot at llvm.org
Wed May 14 23:37:37 PDT 2025
================
@@ -142,22 +142,34 @@ class AllocLikeOp<string mnemonic,
// AssumeAlignmentOp
//===----------------------------------------------------------------------===//
-def AssumeAlignmentOp : MemRef_Op<"assume_alignment"> {
+def AssumeAlignmentOp : MemRef_Op<"assume_alignment", [
+ NoMemoryEffect,
+ ViewLikeOpInterface,
+ SameOperandsAndResultType
+ ]> {
let summary =
"assertion that gives alignment information to the input memref";
let description = [{
- The `assume_alignment` operation takes a memref and an integer of alignment
- value, and internally annotates the buffer with the given alignment. If
- the buffer isn't aligned to the given alignment, the behavior is undefined.
+ The `assume_alignment` operation takes a memref and an integer of alignment
+ value. It returns a new SSA value of the same memref type, but associated
+ with the assertion that the underlying buffer is aligned to the given
+ alignment. If the buffer isn't aligned to the given alignment, the
+ behavior is undefined.
----------------
shay-kl wrote:
I updated the operation to be pure and changed its description accordingly. Going through its uses in the repo it doesn't seem like I need to make changes anywhere else, but I would appreciate if someone would confirm.
https://github.com/llvm/llvm-project/pull/139521
More information about the Mlir-commits
mailing list