llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Farzon Lotfi (farzonl)

<details>
<summary>Changes</summary>

This change moves the DirectX backend out of experimental and adds the 
clang-dxc frontend so the community has a path to trying out the new backend.

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


8 Files Affected:

- (modified) clang/CMakeLists.txt (-4) 
- (modified) clang/cmake/caches/HLSL.cmake (+2-6) 
- (modified) clang/docs/ReleaseNotes.md (+5) 
- (modified) clang/lib/Headers/CMakeLists.txt (-7) 
- (modified) clang/tools/driver/CMakeLists.txt (+1-3) 
- (modified) llvm/CMakeLists.txt (+1-1) 
- (modified) llvm/docs/DirectXUsage.md (+4-11) 
- (modified) llvm/docs/ReleaseNotes.md (+7) 


``````````diff
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 89f584c5dceaa..4e27a6d7259cb 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -527,10 +527,6 @@ option(CLANG_INCLUDE_TESTS
        "Generate build targets for the Clang unit tests."
        ${LLVM_INCLUDE_TESTS})
 
-option(CLANG_ENABLE_HLSL "Include HLSL build products" Off)
-# While HLSL support is experimental this should stay hidden.
-mark_as_advanced(CLANG_ENABLE_HLSL)
-
 add_subdirectory(utils/TableGen)
 
 # Export CLANG_TABLEGEN_EXE for use by flang docs.
diff --git a/clang/cmake/caches/HLSL.cmake b/clang/cmake/caches/HLSL.cmake
index 40e92fd37382b..cf15125a8cad7 100644
--- a/clang/cmake/caches/HLSL.cmake
+++ b/clang/cmake/caches/HLSL.cmake
@@ -1,14 +1,10 @@
 # Including the native target is important because some of LLVM's tests fail if
 # you don't.
-set(LLVM_TARGETS_TO_BUILD "Native;SPIRV" CACHE STRING "")
-
-# Include the DirectX target for DXIL code generation.
-set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "DirectX" CACHE STRING "")
+# The DirectX target is included for DXIL code generation.
+set(LLVM_TARGETS_TO_BUILD "Native;SPIRV;DirectX" CACHE STRING "")
 
 set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "")
 
-set(CLANG_ENABLE_HLSL On CACHE BOOL "")
-
 if (HLSL_ENABLE_DISTRIBUTION)
   set(LLVM_DISTRIBUTION_COMPONENTS
       "clang;hlsl-resource-headers;clangd"
diff --git a/clang/docs/ReleaseNotes.md b/clang/docs/ReleaseNotes.md
index 8c9467ca7b742..1fe41205cad06 100644
--- a/clang/docs/ReleaseNotes.md
+++ b/clang/docs/ReleaseNotes.md
@@ -565,6 +565,11 @@ features cannot lower the translation-unit ABI level;
   - `__builtin_amdgcn_fcmp`
   - `__builtin_amdgcn_fcmpf`
 
+#### DirectX Support
+
+- `clang-dxc` and HLSL support are now enabled by default, following the
+  promotion of the DirectX backend to an official LLVM target.
+
 #### NVPTX Support
 
 #### X86 Support
diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt
index 21b6eb5e38052..3d845423759ac 100644
--- a/clang/lib/Headers/CMakeLists.txt
+++ b/clang/lib/Headers/CMakeLists.txt
@@ -824,26 +824,19 @@ install(
   EXCLUDE_FROM_ALL
   COMPONENT gpu-resource-headers)
 
-if(NOT CLANG_ENABLE_HLSL)
-  set(EXCLUDE_HLSL EXCLUDE_FROM_ALL)
-endif()
-
 install(
   FILES ${hlsl_h}
   DESTINATION ${header_install_dir}
-  ${EXCLUDE_HLSL}
   COMPONENT hlsl-resource-headers)
 
 install(
   FILES ${hlsl_subdir_files}
   DESTINATION ${header_install_dir}/hlsl
-  ${EXCLUDE_HLSL}
   COMPONENT hlsl-resource-headers)
 
 install(
   FILES ${hlsl_generated_files}
   DESTINATION ${header_install_dir}/hlsl
-  ${EXCLUDE_HLSL}
   COMPONENT hlsl-resource-headers)
 
 install(
diff --git a/clang/tools/driver/CMakeLists.txt 
b/clang/tools/driver/CMakeLists.txt
index 002aaef005253..17dbb3ce8a27b 100644
--- a/clang/tools/driver/CMakeLists.txt
+++ b/clang/tools/driver/CMakeLists.txt
@@ -84,9 +84,7 @@ if(NOT CLANG_LINKS_TO_CREATE)
   set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)
 endif()
 
-if (CLANG_ENABLE_HLSL)
-  set(HLSL_LINK clang-dxc)
-endif()
+set(HLSL_LINK clang-dxc)
 
 foreach(link ${CLANG_LINKS_TO_CREATE} ${HLSL_LINK})
   add_clang_symlink(${link} clang)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index b0a40dbdfd423..d4c86946a6327 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -575,6 +575,7 @@ set(LLVM_ALL_TARGETS
   ARM
   AVR
   BPF
+  DirectX
   Hexagon
   Lanai
   LoongArch
@@ -595,7 +596,6 @@ set(LLVM_ALL_TARGETS
 set(LLVM_ALL_EXPERIMENTAL_TARGETS
   ARC
   CSKY
-  DirectX
   M68k
   Xtensa
 )
diff --git a/llvm/docs/DirectXUsage.md b/llvm/docs/DirectXUsage.md
index ea9670d429e31..1141d6ef5b598 100644
--- a/llvm/docs/DirectXUsage.md
+++ b/llvm/docs/DirectXUsage.md
@@ -1,11 +1,5 @@
 # User Guide for the DirectX Target
 
-:::{warning}
-Disclaimer: The DirectX backend is experimental and under active development.
-It is not yet feature complete or ready to be used outside of experimental or
-demonstration contexts.
-:::
-
 ```{toctree}
 :hidden:
 
@@ -25,11 +19,10 @@ interfaces are documented in the [DirectX 
Specifications.](https://github.com/Mi
 Initially the backend is aimed at supporting DirectX 12, and support for 
DirectX
 11 is planned at a later date.
 
-The DirectX backend is currently experimental and is not shipped with any
-release builds of LLVM tools. To build the DirectX backend locally, add
-`DirectX` to the `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD` CMake option. For more
-information on building LLVM see the {doc}`CMake` documentation.
-
+The DirectX backend is an official LLVM target and is built by default as part
+ of `LLVM_ALL_TARGETS`. For more information on building LLVM see the 
+ {doc}`CMake` documentation.
+ 
 (dx-target-triples)=
 
 ## Target Triples
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 9e4811067aa4d..dc3bfdbbb8bf9 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -64,6 +64,10 @@ Makes programs 10x faster by doing Special New Thing.
 
 ### Changes to building LLVM
 
+* The DirectX backend is now an official target and has moved from
+  `LLVM_ALL_EXPERIMENTAL_TARGETS` to `LLVM_ALL_TARGETS`. It is now built by
+  default and no longer requires `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD`.
+
 ### Changes to TableGen
 
 * `!cond` operator short-circuits at the first `true` condition.  Subsequent
@@ -103,6 +107,9 @@ Makes programs 10x faster by doing Special New Thing.
 
 ### Changes to the DirectX Backend
 
+* The DirectX backend has been promoted from experimental to an official,
+  fully supported LLVM target.
+
 ### Changes to the Hexagon Backend
 
 ### Changes to the LoongArch Backend

``````````

</details>


https://github.com/llvm/llvm-project/pull/214066
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to