================
@@ -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
----------------
MrSidims wrote:

First of all I agree, that having a common interface between various frontends 
is a good idea. Yet as from what I see now - the intrinsics added in the PR are 
not common, but tuned only for AMDGPU and NVPTX. And just like 
@michalpaszkowski I don't understand, what place SPIR-V has for those 
intrinsics. 

>The spirv backend should stash these intrinsics in the SPV file like any other 
>ones. It might need a patch to do so or we might get default handling for llvm 
>prefixed intrinsics. That's the point really - we pass information about the 
>SIMT computation through the SPV onward to whatever is dealing with that later.
>I don't know what distinction you're drawing between abstract function calls 
>and intrinsics, terminology is not consistent across compilers here.

Please correct me if I understood this part incorrectly. Is your proposal to 
store `llvm.gpu` intrinsic call in SPIR-V module as is if there is no 
appropriate SPIR-V instruction for it?

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