[mlir] Add an out-of-tree dialect example
authorJean-Michel Gorius <jean-michel.gorius@ens-rennes.fr>
Sat, 4 Apr 2020 17:15:44 +0000 (17:15 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 4 Apr 2020 17:16:43 +0000 (17:16 +0000)
commit160f5aa65fac07d77dc7e7ef715c95b018ac15c9
tree8cf2d245ed185cf028b926df5e4619a795f01610
parentfc5d8b672b981027436a231f4e431d57bdf81407
[mlir] Add an out-of-tree dialect example

This adds a minimal out-of-tree dialect template which can be used to start work on a standalone dialect implementation without having to integrate it in the main LLVM tree.

It mostly sets up the directory structure and provides CMakeLists.txt files to build a dialect library, an opt-like tool to operate on that dialect as well as tests. It could be expanded in the future to add examples of more user-defined operations, types, attributes, generated enums, transforms, etc. and linked to a tutorial.

Differential Revision: https://reviews.llvm.org/D77133
18 files changed:
mlir/examples/standalone/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/README.md [new file with mode: 0644]
mlir/examples/standalone/include/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/include/Standalone/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/include/Standalone/StandaloneDialect.h [new file with mode: 0644]
mlir/examples/standalone/include/Standalone/StandaloneDialect.td [new file with mode: 0644]
mlir/examples/standalone/include/Standalone/StandaloneOps.h [new file with mode: 0644]
mlir/examples/standalone/include/Standalone/StandaloneOps.td [new file with mode: 0644]
mlir/examples/standalone/lib/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/lib/Standalone/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/lib/Standalone/StandaloneDialect.cpp [new file with mode: 0644]
mlir/examples/standalone/lib/Standalone/StandaloneOps.cpp [new file with mode: 0644]
mlir/examples/standalone/standalone-opt/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/standalone-opt/standalone-opt.cpp [new file with mode: 0644]
mlir/examples/standalone/test/CMakeLists.txt [new file with mode: 0644]
mlir/examples/standalone/test/Standalone/dummy.mlir [new file with mode: 0644]
mlir/examples/standalone/test/lit.cfg.py [new file with mode: 0644]
mlir/examples/standalone/test/lit.site.cfg.py.in [new file with mode: 0644]