[mlir][Memref] Introduce a memref::ExtractAlignedPointerAsIndexOp
As experience with memref::ExtractStridedMetadataOp grows we are still missing a simple way to extract the pointer held by a memref and lower to different backednds (LLVM, SPIRV, library calls). This revision introduces a memref.extract_aligned_pointer_as_index that returns an index containing the aligned pointer of the strided memref. This operation is intended to be used solely as step during lowering, it has no side effects. A reverse operation that creates a memref from an index interpreted as a pointer is explicitly discouraged. Differential Revision: https://reviews.llvm.org/D134651
Loading
Please sign in to comment