[PATCH] D116668: libclc: Add clspv64 target

Kévin Petit via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 08:37:34 PST 2022


kpet created this revision.
kpet added a reviewer: alan-baker.
Herald added subscribers: jvesely, Anastasia, mgorny.
kpet requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add a variant of the clspv target that is built using spir64.
This is a pre-requisite to supporting spir64 in clspv which is
required to take advantage of SPV_KHR_physical_storage_buffer which
in turn enables more OpenCL C programs to be compiled with clspv.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116668

Files:
  libclc/CMakeLists.txt


Index: libclc/CMakeLists.txt
===================================================================
--- libclc/CMakeLists.txt
+++ libclc/CMakeLists.txt
@@ -8,6 +8,7 @@
   amdgcn-mesa3d/lib/SOURCES;
   amdgpu/lib/SOURCES;
   clspv/lib/SOURCES;
+  clspv64/lib/SOURCES;
   generic/lib/SOURCES;
   ptx/lib/SOURCES;
   ptx-nvidiacl/lib/SOURCES;
@@ -21,6 +22,7 @@
   amdgcn--
   amdgcn--amdhsa
   clspv--
+  clspv64--
   r600--
   nvptx--
   nvptx64--
@@ -156,6 +158,7 @@
 set( amdgcn-mesa-mesa3d_devices ${amdgcn--_devices} )
 set( amdgcn--amdhsa_devices none )
 set( clspv--_devices none )
+set( clspv64--_devices none )
 set( nvptx--_devices none )
 set( nvptx64--_devices none )
 set( nvptx--nvidiacl_devices none )
@@ -214,7 +217,8 @@
 
 	set( dirs )
 
-	if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND NOT ${ARCH} STREQUAL clspv )
+	if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND NOT
+            ${ARCH} STREQUAL clspv AND NOT ${ARCH} STREQUAL clspv64)
 		LIST( APPEND dirs generic )
 	endif()
 
@@ -245,7 +249,8 @@
 
 	# Add the generated convert.cl here to prevent adding
 	# the one listed in SOURCES
-	if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND NOT ${ARCH} STREQUAL "clspv" )
+	if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND
+            NOT ${ARCH} STREQUAL "clspv" AND NOT ${ARCH} STREQUAL "clspv64" )
 		set( rel_files convert.cl )
 		set( objects convert.cl )
 		if( NOT ENABLE_RUNTIME_SUBNORMAL )
@@ -295,8 +300,12 @@
 			set( build_flags -O0 -finline-hint-functions )
 			set( opt_flags )
 			set( spvflags --spirv-max-version=1.1 )
-		elseif( ${ARCH} STREQUAL "clspv" )
-			set( t "spir--" )
+		elseif( ${ARCH} STREQUAL "clspv" OR ${ARCH} STREQUAL "clspv64" )
+			if( ${ARCH} STREQUAL "clspv" )
+				set( t "spir--" )
+			else()
+				set( t "spir64--" )
+			endif()
 			set( build_flags )
 			set( opt_flags -O3 )
 		else()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116668.397595.patch
Type: text/x-patch
Size: 1930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/cb405e7f/attachment.bin>


More information about the llvm-commits mailing list