[libclc] [libclc] Add an option to build SPIR-V targets with the LLVM backend (PR #151347)
Konrad Kleine via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 25 02:32:51 PST 2025
kwk wrote:
Hi. When trying to build `libclc` using `LIBCLC_USE_SPIRV_BACKEND=ON` on a beefy machine I run into memory issues as can be seen in these screenshots:
Here we begin compiling a bc file:
<img width="1789" height="900" alt="image" src="https://github.com/user-attachments/assets/c24861b5-c66b-433a-9cda-dcf0b6af5b94" />
Still compiling the same file, memory goes up to 62GB + 8GB of swap:
<img width="1789" height="900" alt="Screenshot From 2025-11-25 11-21-41" src="https://github.com/user-attachments/assets/bf45b2eb-c456-4919-8108-1ca41e0d01cc" />
Here's the failing result:
<img width="1861" height="902" alt="image" src="https://github.com/user-attachments/assets/6f6be36a-0d6f-4ebe-b996-1a94fe10e284" />
The file being compiled at the time of high memory consumption is this:
```console
> ls -hla /builddir/build/BUILD/llvm-22.0.0_pre20251106.g93ef57617d080f-build/llvm-project-93ef57617d080f6eac7a064e09f3e4145c334ae8/llvm/redhat-linux-build/tools/libclc/obj.libclc.dir/amdgcn--amdhsa/builtins.opt.amdgcn--amdhsa.bc
-rw-r--r--. 1 mockbuild mock 6.6M Nov 25 10:16 /builddir/build/BUILD/llvm-22.0.0_pre20251106.g93ef57617d080f-build/llvm-project-93ef57617d080f6eac7a064e09f3e4145c334ae8/llvm/redhat-linux-build/tools/libclc/obj.libclc.dir/amdgcn--amdhsa/builtins.opt.amdgcn--amdhsa.bc
```
The code I test with is from Nov. 6th 2025 93ef57617d080f. I try to build with a newer revision of LLVM but I think it is worth mentioning this.
https://github.com/llvm/llvm-project/pull/151347
More information about the cfe-commits
mailing list