[mlir][shape] add outline-shape-computation pass
authorYuanqiang Liu <liuyuanqiang.yqliu@bytedance.com>
Mon, 3 Oct 2022 03:24:49 +0000 (20:24 -0700)
committerJacques Pienaar <jpienaar@google.com>
Mon, 3 Oct 2022 03:24:49 +0000 (20:24 -0700)
commit9f77909a5e07b7973fe13d4ea6391c29ff1b46b5
treef4f7fd38c79d2b8ec7ab147dd1f1b22e7cf2113f
parent8bcf22e3182c8d1b9de4a9b45e424a9dc490a1f8
[mlir][shape] add outline-shape-computation pass

Add outline-shape-computation pass. This pass his pass outlines the
shape computation part in high level IR by adding shape.func and
populate corresponding mapping information into ShapeMappingAnalysis.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D131810
mlir/include/mlir/Dialect/Shape/Analysis/ShapeMappingAnalysis.h [new file with mode: 0644]
mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
mlir/include/mlir/Dialect/Shape/Transforms/Passes.td
mlir/lib/Dialect/Shape/Transforms/CMakeLists.txt
mlir/lib/Dialect/Shape/Transforms/OutlineShapeComputation.cpp [new file with mode: 0644]
mlir/test/Dialect/Shape/outline-shape-computation.mlir [new file with mode: 0644]
mlir/test/lib/Dialect/Shape/CMakeLists.txt
mlir/test/lib/Dialect/Shape/TestShapeMappingAnalysis.cpp [new file with mode: 0644]
mlir/tools/mlir-opt/mlir-opt.cpp