diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-09-28 14:50:44 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-09-28 14:50:44 +0100 |
commit | a08f79d3e01c92859e6b33f602b2be2bb8c52e61 (patch) | |
tree | aa6fe94ea8b3ad841dbda0e354a88f8291d6973d /lib | |
download | gsa-mlir-a08f79d3e01c92859e6b33f602b2be2bb8c52e61.tar.gz gsa-mlir-a08f79d3e01c92859e6b33f602b2be2bb8c52e61.zip |
Add initial files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Standalone/CMakeLists.txt | 13 | ||||
-rw-r--r-- | lib/Standalone/StandaloneDialect.cpp | 26 | ||||
-rw-r--r-- | lib/Standalone/StandaloneOps.cpp | 14 |
4 files changed, 54 insertions, 0 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 0000000..da11071 --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Standalone) diff --git a/lib/Standalone/CMakeLists.txt b/lib/Standalone/CMakeLists.txt new file mode 100644 index 0000000..c8b16b7 --- /dev/null +++ b/lib/Standalone/CMakeLists.txt @@ -0,0 +1,13 @@ +add_mlir_dialect_library(MLIRStandalone + StandaloneDialect.cpp + StandaloneOps.cpp + + ADDITIONAL_HEADER_DIRS + ${PROJECT_SOURCE_DIR}/include/Standalone + + DEPENDS + MLIRStandaloneOpsIncGen + + LINK_LIBS PUBLIC + MLIRIR + ) diff --git a/lib/Standalone/StandaloneDialect.cpp b/lib/Standalone/StandaloneDialect.cpp new file mode 100644 index 0000000..cdd9337 --- /dev/null +++ b/lib/Standalone/StandaloneDialect.cpp @@ -0,0 +1,26 @@ +//===- StandaloneDialect.cpp - Standalone dialect ---------------*- C++ -*-===// +// +// This file is licensed under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "Standalone/StandaloneDialect.h" +#include "Standalone/StandaloneOps.h" + +using namespace mlir; +using namespace mlir::standalone; + +#include "Standalone/StandaloneOpsDialect.cpp.inc" + +//===----------------------------------------------------------------------===// +// Standalone dialect. +//===----------------------------------------------------------------------===// + +void StandaloneDialect::initialize() { + addOperations< +#define GET_OP_LIST +#include "Standalone/StandaloneOps.cpp.inc" + >(); +} diff --git a/lib/Standalone/StandaloneOps.cpp b/lib/Standalone/StandaloneOps.cpp new file mode 100644 index 0000000..497eb98 --- /dev/null +++ b/lib/Standalone/StandaloneOps.cpp @@ -0,0 +1,14 @@ +//===- StandaloneOps.cpp - Standalone dialect ops ---------------*- C++ -*-===// +// +// This file is licensed under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "Standalone/StandaloneOps.h" +#include "Standalone/StandaloneDialect.h" +#include "mlir/IR/OpImplementation.h" + +#define GET_OP_CLASSES +#include "Standalone/StandaloneOps.cpp.inc" |