================
@@ -0,0 +1,501 @@
+//===- LowerGPUIntrinsic.cpp 
----------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Lower the llvm.gpu intrinsics to target specific code sequences.
+// Can be called from clang if building for a specific GPU or from the backend
+// as part of a SPIRV lowering pipeline. Initial pass can lower to amdgcn or
----------------
michalpaszkowski wrote:

I don't understand how this pass fits into the SPIR-V lowering pipeline. Is 
this confusing [SPIR and 
SPIR-V](https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation)?
 SPIR being the format based on LLVM IR (although on an old version of LLVM 
3.4)? SPIR-V being a custom [Khronos-defined 
format](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html).

[While SPIR-V easily maps to LLVM 
IR](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/main/docs/SPIRVRepresentationInLLVM.rst),
 it is far from being a standardized mapping and the actual translation is 
usually handled by either 
[SPIRV-LLVM-Translator](https://github.com/KhronosGroup/SPIRV-LLVM-Translator) 
or the in-tree SPIR-V backend.

Could you please comment on how this pass and the changes would fit into the 
current SPIR-V code generation flow through the SPIR-V backend?

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

Reply via email to