[flang-commits] [compiler-rt] [lld] [openmp] [libcxx] [mlir] [clang] [lldb] [llvm] [flang] [libc] [clang-tools-extra] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)
Mehdi Amini via flang-commits
flang-commits at lists.llvm.org
Tue Dec 5 19:15:55 PST 2023
================
@@ -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 ®istry) {
+ registry.insert<spirv::SPIRVDialect>();
----------------
joker-eph wrote:
It does not make sense to me to have an API called "registerSPIRVDialectTranslation" that itself registers a dialect and no translation actually.
https://github.com/llvm/llvm-project/pull/71430
More information about the flang-commits
mailing list