[Mlir-commits] [mlir] f2557cf - [mlir][cpu-runner] register all llvm ir dialects
Aart Bik
llvmlistbot at llvm.org
Wed Mar 17 10:06:06 PDT 2021
Author: Aart Bik
Date: 2021-03-17T10:05:46-07:00
New Revision: f2557cf7ed39b111d2a6aa27787f75961dafc0de
URL: https://github.com/llvm/llvm-project/commit/f2557cf7ed39b111d2a6aa27787f75961dafc0de
DIFF: https://github.com/llvm/llvm-project/commit/f2557cf7ed39b111d2a6aa27787f75961dafc0de.diff
LOG: [mlir][cpu-runner] register all llvm ir dialects
This fixes broken JIT functionality on emulator platforms.
With Alex' recent movement towards squashing llvm ir dialects
into target specific dialects, we now must ensure these dialects
are registered to the cpu runner to ensure JIT can lower this
to proper LLVM IR before handing this off to the backend.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D98727
Added:
Modified:
mlir/tools/mlir-cpu-runner/CMakeLists.txt
mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
index 1135a683eb6e..cc3b468b2d38 100644
--- a/mlir/tools/mlir-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
@@ -17,8 +17,7 @@ target_link_libraries(mlir-cpu-runner PRIVATE
MLIRJitRunner
MLIRLLVMIR
MLIRLLVMToLLVMIRTranslation
- MLIROpenMP
- MLIROpenMPToLLVMIRTranslation
+ MLIRToLLVMIRTranslationRegistration
MLIRParser
MLIRTargetLLVMIRExport
MLIRSupport
diff --git a/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp b/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
index d22b3a20bc8b..b1009a1fae45 100644
--- a/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
+++ b/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
@@ -16,8 +16,7 @@
#include "mlir/ExecutionEngine/JitRunner.h"
#include "mlir/ExecutionEngine/OptUtils.h"
#include "mlir/IR/Dialect.h"
-#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"
-#include "mlir/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.h"
+#include "mlir/Target/LLVMIR/Dialect/All.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/TargetSelect.h"
@@ -30,8 +29,7 @@ int main(int argc, char **argv) {
mlir::initializeLLVMPasses();
mlir::DialectRegistry registry;
- mlir::registerLLVMDialectTranslation(registry);
- mlir::registerOpenMPDialectTranslation(registry);
+ mlir::registerAllToLLVMIRTranslations(registry);
return mlir::JitRunnerMain(argc, argv, registry);
}
More information about the Mlir-commits
mailing list