aboutsummaryrefslogtreecommitdiffstats
path: root/standalone-opt
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-09-26 19:08:01 +0100
committerYann Herklotz <git@yannherklotz.com>2022-09-26 19:08:48 +0100
commit0034f32d6d85d7f21cf04c82083860cdb2fe1ddb (patch)
treef37f65190acd6040a262cdb7d2dbf6e2b17556f5 /standalone-opt
parentb018c1ef00eade87c9efbf48cc2e3466877ea79d (diff)
downloadgsa-mlir-master.tar.gz
gsa-mlir-master.zip
Update MLIR files and include LLVM directoryHEADmaster
Diffstat (limited to 'standalone-opt')
-rw-r--r--standalone-opt/CMakeLists.txt1
-rw-r--r--standalone-opt/standalone-opt.cpp7
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