diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-09-26 19:08:01 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-09-26 19:08:48 +0100 |
commit | 0034f32d6d85d7f21cf04c82083860cdb2fe1ddb (patch) | |
tree | f37f65190acd6040a262cdb7d2dbf6e2b17556f5 /standalone-opt | |
parent | b018c1ef00eade87c9efbf48cc2e3466877ea79d (diff) | |
download | gsa-mlir-0034f32d6d85d7f21cf04c82083860cdb2fe1ddb.tar.gz gsa-mlir-0034f32d6d85d7f21cf04c82083860cdb2fe1ddb.zip |
Diffstat (limited to 'standalone-opt')
-rw-r--r-- | standalone-opt/CMakeLists.txt | 1 | ||||
-rw-r--r-- | standalone-opt/standalone-opt.cpp | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/standalone-opt/CMakeLists.txt b/standalone-opt/CMakeLists.txt index 06bbb47..ae459aa 100644 --- a/standalone-opt/CMakeLists.txt +++ b/standalone-opt/CMakeLists.txt @@ -3,6 +3,7 @@ get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS) set(LIBS ${dialect_libs} ${conversion_libs} + MLIRArithmeticDialect MLIROptLib MLIRStandalone ) diff --git a/standalone-opt/standalone-opt.cpp b/standalone-opt/standalone-opt.cpp index 97a996a..e84628f 100644 --- a/standalone-opt/standalone-opt.cpp +++ b/standalone-opt/standalone-opt.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/IR/Dialect.h" #include "mlir/IR/MLIRContext.h" #include "mlir/InitAllDialects.h" @@ -13,7 +14,7 @@ #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" #include "mlir/Support/FileUtilities.h" -#include "mlir/Support/MlirOptMain.h" +#include "mlir/Tools/mlir-opt/MlirOptMain.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/SourceMgr.h" @@ -26,8 +27,8 @@ int main(int argc, char **argv) { // TODO: Register standalone passes here. mlir::DialectRegistry registry; - registry.insert<mlir::standalone::StandaloneDialect>(); - registry.insert<mlir::StandardOpsDialect>(); + registry.insert<mlir::standalone::StandaloneDialect, + mlir::arith::ArithmeticDialect, mlir::func::FuncDialect>(); // Add the following to include *all* MLIR Core dialects, or selectively // include what you need like above. You only need to register dialects that // will be *parsed* by the tool, not the one generated |