This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][memref] Add details on the semantic of reinterpret_cast
ClosedPublic

Authored by qcolombet on Jan 13 2023, 12:10 AM.

Details

Summary

Make it clearer what the semantic of reinterpret_cast is.

In particular, call out that this instruction is not a no-op.

NFC

Related to https://github.com/llvm/llvm-project/issues/59896

Diff Detail

Event Timeline

qcolombet created this revision.Jan 13 2023, 12:10 AM
qcolombet requested review of this revision.Jan 13 2023, 12:10 AM
pifon2a accepted this revision.Jan 13 2023, 12:11 AM

Thank you!

This revision is now accepted and ready to land.Jan 13 2023, 12:11 AM
mehdi_amini added inline comments.Jan 13 2023, 1:54 AM
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
1259

In general I believe we avoided defining the memref semantics in terms of "descriptor" which was intended as one possible LLVM lowering (so an implementation detail basically).

(I'm not sure if the doc is still decoupled though)

qcolombet added inline comments.Jan 13 2023, 2:21 AM
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
1259

Ah shoot, I already pushed the change.
How do you recommend that we amend this change?

Leaving out the "In other words[...]" part that breaks down the memref descriptor?