summaryrefslogtreecommitdiff
path: root/mlir/tools
diff options
context:
space:
mode:
authorFabian Mora <fmorac@udel.edu>2023-04-06 09:09:00 -0700
committerJacques Pienaar <jpienaar@google.com>2023-04-06 09:33:21 -0700
commitd4c873b044aeebaa43e6989fb1f9606530ec60cf (patch)
treee5d76e9e35d91f611ce19c69762fb946623e8cd9 /mlir/tools
parent77313ddfb211ba854ecc2bb042d4847e82925604 (diff)
downloadllvm-d4c873b044aeebaa43e6989fb1f9606530ec60cf.tar.gz
Implement Pass and Dialect plugins for mlir-opt
Implementation of Pass and Dialect Plugins that mirrors LLVM Pass Plugin implementation from the new pass manager. Currently the implementation only supports using the pass-pipeline option for adding passes. This restriction is imposed by the `PassPipelineCLParser` variable in mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:114 that loads the parse options statically before parsing the cmd line args. ``` mlir-opt stanalone-plugin.mlir --load-dialect-plugin=lib/libStandalonePlugin.so --pass-pipeline="builtin.module(standalone-switch-bar-foo)" ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D147053
Diffstat (limited to 'mlir/tools')
-rw-r--r--mlir/tools/mlir-opt/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt
index c43056906da8..2d021d58c49a 100644
--- a/mlir/tools/mlir-opt/CMakeLists.txt
+++ b/mlir/tools/mlir-opt/CMakeLists.txt
@@ -79,8 +79,10 @@ add_mlir_tool(mlir-opt
DEPENDS
${LIBS}
+ SUPPORT_PLUGINS
)
target_link_libraries(mlir-opt PRIVATE ${LIBS})
llvm_update_compile_flags(mlir-opt)
mlir_check_all_link_libraries(mlir-opt)
+export_executable_symbols_for_plugins(mlir-opt)