[libc-commits] [libc] 9bfe486 - [libc] Initial support for parsing SPIR-V for GPU libc (#128570)
via libc-commits
libc-commits at lists.llvm.org
Mon Feb 24 13:18:57 PST 2025
Author: Joseph Huber
Date: 2025-02-24T15:18:53-06:00
New Revision: 9bfe48695ed837bdc788b1ba0e877726ce83befb
URL: https://github.com/llvm/llvm-project/commit/9bfe48695ed837bdc788b1ba0e877726ce83befb
DIFF: https://github.com/llvm/llvm-project/commit/9bfe48695ed837bdc788b1ba0e877726ce83befb.diff
LOG: [libc] Initial support for parsing SPIR-V for GPU libc (#128570)
Summary:
Some day we'd like to support this, add some initial support for parsing
the triple so it will at least attempt to build.
Added:
Modified:
libc/cmake/modules/LLVMLibCArchitectures.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index fbb1091ddabab..b94534bb00980 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -53,6 +53,8 @@ function(get_arch_and_system_from_triple triple arch_var sys_var)
set(target_arch "amdgpu")
elseif(target_arch MATCHES "^nvptx64")
set(target_arch "nvptx")
+ elseif(target_arch MATCHES "^spirv64")
+ set(target_arch "spirv64")
else()
return()
endif()
@@ -162,6 +164,8 @@ elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "amdgpu")
set(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU TRUE)
elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "nvptx")
set(LIBC_TARGET_ARCHITECTURE_IS_NVPTX TRUE)
+elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "spirv64")
+ set(LIBC_TARGET_ARCHITECTURE_IS_SPIRV TRUE)
else()
message(FATAL_ERROR
"Unsupported libc target architecture ${LIBC_TARGET_ARCHITECTURE}")
More information about the libc-commits
mailing list