diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt index bc8eed18215525..b6ada66d321880 100644 --- a/mlir/tools/mlir-opt/CMakeLists.txt +++ b/mlir/tools/mlir-opt/CMakeLists.txt @@ -67,6 +67,10 @@ set(LIBS MLIRTransformUtils MLIRSupport MLIRIR + + # TODO: Remove when registerAllGPUToLLVMIRTranslations is no longer + # registered directly in mlir-opt.cpp. + MLIRToLLVMIRTranslationRegistration ) # Exclude from libMLIR.so because this has static options intended for diff --git a/mlir/tools/mlir-opt/mlir-opt.cpp b/mlir/tools/mlir-opt/mlir-opt.cpp index c7cf1e55a556f4..b7c69eabbcd8bf 100644 --- a/mlir/tools/mlir-opt/mlir-opt.cpp +++ b/mlir/tools/mlir-opt/mlir-opt.cpp @@ -276,6 +276,10 @@ int main(int argc, char **argv) { DialectRegistry registry; registerAllDialects(registry); registerAllExtensions(registry); + + // TODO: Remove this and the corresponding MLIRToLLVMIRTranslationRegistration + // cmake dependency when a safe dialect interface registration mechanism is + // implemented, see D157703 (and corresponding note on the declaration). registerAllGPUToLLVMIRTranslations(registry); #ifdef MLIR_INCLUDE_TESTS