[llvm] [SPIR-V] Add SPIRV to LLVM_ALL_TARGETS (PR #119653)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 19:28:26 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-spir-v

Author: Michal Paszkowski (michalpaszkowski)

<details>
<summary>Changes</summary>

This commit promotes the SPIR-V backend from experimental to official status. As a result, SPIR-V will be built by default, simplifying integration and increasing accessibility for downstream projects.

Discussion and RFC on Discourse: https://discourse.llvm.org/t/rfc-promoting-spir-v-to-an-official-target/83614

---
Full diff: https://github.com/llvm/llvm-project/pull/119653.diff


3 Files Affected:

- (modified) .github/workflows/spirv-tests.yml (+1-1) 
- (modified) llvm/CMakeLists.txt (+1-1) 
- (modified) llvm/docs/ReleaseNotes.md (+6) 


``````````diff
diff --git a/.github/workflows/spirv-tests.yml b/.github/workflows/spirv-tests.yml
index 75918e73e89737..2a47690fe79aec 100644
--- a/.github/workflows/spirv-tests.yml
+++ b/.github/workflows/spirv-tests.yml
@@ -25,5 +25,5 @@ jobs:
     with:
       build_target: check-llvm-codegen-spirv
       projects:
-      extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON'
+      extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON'
       os_list: '["ubuntu-latest"]'
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index f14065ab037990..ad12100fdb5b89 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -486,6 +486,7 @@ set(LLVM_ALL_TARGETS
   PowerPC
   RISCV
   Sparc
+  SPIRV
   SystemZ
   VE
   WebAssembly
@@ -498,7 +499,6 @@ set(LLVM_ALL_EXPERIMENTAL_TARGETS
   CSKY
   DirectX
   M68k
-  SPIRV
   Xtensa
 )
 
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index a5805e050bfdbe..07b6416e069645 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -47,6 +47,12 @@ for adding a new subsection. -->
   same semantics. The normalizer makes it easier to spot semantic differences
   when diffing two modules which have undergone different passes.
 
+* The SPIR-V backend is now an official LLVM target, enabling support for 
+  SPIR-V across a range of APIs and use cases, including OpenCL, Vulkan, SYCL,
+  GLSL, and HLSL. This backend serves as a unified solution for diverse compute
+  and graphics workloads, offering a robust alternative to the Khronos SPIR-V
+  LLVM Translator.
+
 * ...
 
 <!-- If you would like to document a larger change, then you can add a

``````````

</details>


https://github.com/llvm/llvm-project/pull/119653


More information about the llvm-commits mailing list