From 60318a1e39897a0535cf7699c2e4ab6366d0687f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 15 Jul 2024 18:54:41 -0700 Subject: 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. --- src/Compilation.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Compilation.zig') 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; -- cgit v1.2.3