================ @@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ®istry) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry); ---------------- fabianmcg wrote:
The call to `registry.insert<spirv::SPIRVDialect>();` is needed so that `mlir-translate` can parse the code containing the SPIR-V target attribute, nothing more; there's no translation happening from SPIR-V to LLVM. If the call is not added, then `mlir-translate` throws an error because `SPIR-V` never gets registered. The question is, should an empty translation to LLVM should be added to mirror all other * to LLVM translation code structure, or is inlining the call ok? I definitely prefer the second option -one less target. https://github.com/llvm/llvm-project/pull/71430 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits