[libclc] [libclc] Change SPIR-V build flag from -O0 to -disable-llvm-passes (PR #202891)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 00:26:37 PDT 2026
================
@@ -145,7 +145,7 @@ if(LIBCLC_TARGET_ARCH IN_LIST LIBCLC_ARCHS_SPIRV)
if(LIBCLC_TARGET_OS STREQUAL vulkan)
list(APPEND target_compile_flags -Wno-unknown-assumption -U__opencl_c_int64)
else()
- list(APPEND target_compile_flags -O0 -finline-hint-functions)
+ list(APPEND target_compile_flags "SHELL:-Xclang -disable-llvm-passes")
----------------
nikic wrote:
The fact that always_inline was removed implies that they are not mandatory.
I guess the issue here is that -O0 adds optnone flags and that prevents backend passes from running. Previously always_inline still made that work because that works even at optnone.
Anyway, we should really try to figure out whether we can remove this option entirely (if it was just working around SPIRV optimization issues in the past), but the change itself seems ok for now?
https://github.com/llvm/llvm-project/pull/202891
More information about the cfe-commits
mailing list