OSDN Git Service

[mlir][Affine] Introduce affine memory interfaces
authorDiego Caballero <diego.caballero@intel.com>
Wed, 20 May 2020 00:16:04 +0000 (17:16 -0700)
committerDiego Caballero <diego.caballero@intel.com>
Wed, 20 May 2020 00:32:50 +0000 (17:32 -0700)
commita45fb1942fc5d21dfcdc37b99ab98778d3b16b79
treedc155f32763c8ed73a27aa772fe6429b59f6fc56
parentfb8204b210315807d6c18709c008a358d730aeff
[mlir][Affine] Introduce affine memory interfaces

This patch introduces interfaces for read and write ops with affine
restrictions. I used `read`/`write` intead of `load`/`store` for the
interfaces so that they can also be implemented by dma ops.
For now, they are only implemented by affine.load, affine.store,
affine.vector_load and affine.vector_store.

For testing purposes, this patch also migrates affine loop fusion and
required analysis to use the new interfaces. No other changes are made
beyond that.

Co-authored-by: Alex Zinenko <zinenko@google.com>
Reviewed By: bondhugula, ftynse

Differential Revision: https://reviews.llvm.org/D79829
mlir/include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h [new file with mode: 0644]
mlir/include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td [new file with mode: 0644]
mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
mlir/include/mlir/Dialect/Affine/IR/CMakeLists.txt
mlir/lib/Analysis/AffineAnalysis.cpp
mlir/lib/Analysis/Utils.cpp
mlir/lib/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp [new file with mode: 0644]
mlir/lib/Dialect/Affine/IR/CMakeLists.txt
mlir/lib/Transforms/LoopFusion.cpp
mlir/test/lib/Transforms/TestMemRefBoundCheck.cpp