diff --git a/mlir/include/mlir/InitAllTranslations.h b/mlir/include/mlir/InitAllTranslations.h --- a/mlir/include/mlir/InitAllTranslations.h +++ b/mlir/include/mlir/InitAllTranslations.h @@ -17,6 +17,7 @@ namespace mlir { void registerFromLLVMIRTranslation(); +void registerFromSPIRVTranslation(); void registerToLLVMIRTranslation(); void registerToSPIRVTranslation(); void registerToNVVMIRTranslation(); @@ -29,6 +30,7 @@ inline void registerAllTranslations() { static bool init_once = []() { registerFromLLVMIRTranslation(); + registerFromSPIRVTranslation(); registerToLLVMIRTranslation(); registerToSPIRVTranslation(); registerToNVVMIRTranslation(); diff --git a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp @@ -61,7 +61,7 @@ } namespace mlir { -void registerToSPIRVTranslation() { +void registerFromSPIRVTranslation() { TranslateToMLIRRegistration fromBinary( "deserialize-spirv", [](llvm::SourceMgr &sourceMgr, MLIRContext *context) { @@ -101,7 +101,7 @@ } namespace mlir { -void registerFromSPIRVTranslation() { +void registerToSPIRVTranslation() { TranslateFromMLIRRegistration toBinary( "serialize-spirv", [](ModuleOp module, raw_ostream &output) { return serializeModule(module, output);