================
@@ -0,0 +1,31 @@
+//===- SPIRVToLLVMIRTranslation.cpp - Translate SPIRV to LLVM IR 
----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements a translation between the MLIR SPIRV dialect and
+// LLVM IR.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Target/LLVMIR/Dialect/SPIRV/SPIRVToLLVMIRTranslation.h"
+#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
+#include "mlir/IR/BuiltinAttributes.h"
+#include "mlir/IR/Operation.h"
+#include "mlir/Target/LLVMIR/ModuleTranslation.h"
+
+using namespace mlir;
+using namespace mlir::LLVM;
+
+void mlir::registerSPIRVDialectTranslation(DialectRegistry &registry) {
+  registry.insert<spirv::SPIRVDialect>();
----------------
fabianmcg wrote:

I'm sorry I missed these. I had the same concern, the alternative was adding an 
inline registration call. However, I then realized that adding `#include 
"mlir/Dialect/SPIRV/IR/SPIRVDialect.h"` to `mlir/Target/LLVMIR/Dialect/All.h` 
was needed , which seemed even more undesirable thus I changed my mind and 
agreed on the current scheme. 
One way to clean it, is removing inline function from 
`mlir/Target/LLVMIR/Dialect/All.h` and creating a `MLIRToLLVMIR` library.

https://github.com/llvm/llvm-project/pull/71430
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to