diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-07-15 18:54:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-07-15 18:54:41 -0700 |
| commit | 60318a1e39897a0535cf7699c2e4ab6366d0687f (patch) | |
| tree | 1e8945279c48013c6f1717946945437322e62002 /src/Compilation.zig | |
| parent | 888708ec8af9b60681ef14fb0a5c265f2a30b41f (diff) | |
| download | zig-60318a1e39897a0535cf7699c2e4ab6366d0687f.tar.gz zig-60318a1e39897a0535cf7699c2e4ab6366d0687f.zip | |
frontend: move updateZirRefs to be single-threaded
for simplicity's sake. This makes it O(M) instead of O(N*M) where N is
tracked insts and M is number of changed source files.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 76dc42fc64..3d80cdb6a1 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3596,6 +3596,11 @@ fn performAllTheWorkInner( if (comp.module) |zcu| { const pt: Zcu.PerThread = .{ .zcu = comp.module.?, .tid = .main }; + if (comp.incremental) { + const update_zir_refs_node = main_progress_node.start("Update ZIR References", 0); + defer update_zir_refs_node.end(); + try pt.updateZirRefs(); + } try reportMultiModuleErrors(pt); try zcu.flushRetryableFailures(); zcu.sema_prog_node = main_progress_node.start("Semantic Analysis", 0); @@ -4306,7 +4311,7 @@ fn workerAstGenFile( defer child_prog_node.end(); const pt: Zcu.PerThread = .{ .zcu = comp.module.?, .tid = @enumFromInt(tid) }; - pt.astGenFile(file, file_index, path_digest, root_decl) catch |err| switch (err) { + pt.astGenFile(file, path_digest, root_decl) catch |err| switch (err) { error.AnalysisFail => return, else => { file.status = .retryable_failure; |
