[clang] [CIR][CUDA] Add semantic surface reference type (PR #223013)
Konstantinos Parasyris via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 13 18:38:05 PDT 2026
================
@@ -401,6 +401,20 @@ def CIR_VPtrType : CIR_Type<"VPtr", "vptr", [
}];
}
+//===----------------------------------------------------------------------===//
+// CUDADeviceSurfaceType
+//===----------------------------------------------------------------------===//
+
+def CIR_CUDADeviceSurfaceType :
+ CIR_Type<"CUDADeviceSurface", "cuda_surface"> {
+ let summary = "CUDA device surface reference type";
+ let description = [{
+ `!cir.cuda_surface` represents a CUDA built-in surface reference in CIR.
+ The type preserves surface semantics at the CIR level and is lowered to
+ the target device representation during lowering to LLVM IR.
----------------
koparasy wrote:
I would like to see here NVPTX being mentioned. AFAIK this is not a general device convention, while other targets are not reaching to this type. Something among the lines of:
```
The type preserves surface semantics at the CIR level and lowers to the NVPTX
device-side handle representation (`i64`) during lowering to LLVM IR.
```
https://github.com/llvm/llvm-project/pull/223013
More information about the cfe-commits
mailing list