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

This is all written in terms of the spirv64-unknown-unknown triple. The in tree 
backend writes that out as SPV which sort of punts the problem onward to 
someone else, or the spirv-translator converts the spirv--unknown-unknown LLVM 
IR into SPV. Then the spirv-translator or something else turns the SPV into 
something executable.

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.

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