aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authorAli Cheraghi <alichraghi@proton.me>2025-08-02 04:16:01 +0330
committerAli Cheraghi <alichraghi@proton.me>2025-08-02 04:16:01 +0330
commit31de2c873fa206a8fd491f7c9c959845fb86b0a1 (patch)
treebea6a7f47e58b557e0d2483d707f9e2af1c2f459 /src/Zcu/PerThread.zig
parent982c387753c33a9eb42349c109fc4a6ed0675165 (diff)
downloadzig-31de2c873fa206a8fd491f7c9c959845fb86b0a1.tar.gz
zig-31de2c873fa206a8fd491f7c9c959845fb86b0a1.zip
spirv: refactor
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig
index 119b742a89..fac09f2fc0 100644
--- a/src/Zcu/PerThread.zig
+++ b/src/Zcu/PerThread.zig
@@ -4398,13 +4398,10 @@ fn runCodegenInner(pt: Zcu.PerThread, func_index: InternPool.Index, air: *Air) e
const lf = comp.bin_file orelse return error.NoLinkFile;
- // TODO: self-hosted codegen should always have a type of MIR; codegen should produce that MIR,
- // and the linker should consume it. However, our SPIR-V backend is currently tightly coupled
- // with our SPIR-V linker, so needs to work more like the LLVM backend. This should be fixed to
- // unblock threaded codegen for SPIR-V.
+ // Just like LLVM, the SPIR-V backend can't multi-threaded due to SPIR-V design limitations.
if (lf.cast(.spirv)) |spirv_file| {
assert(pt.tid == .main); // SPIR-V has a lot of shared state
- spirv_file.object.updateFunc(pt, func_index, air, &liveness) catch |err| {
+ spirv_file.updateFunc(pt, func_index, air, &liveness) catch |err| {
switch (err) {
error.OutOfMemory => comp.link_diags.setAllocFailure(),
}