Merge pull request #23552 from alichraghi

Progress towards support for running LLVM backend in a separate thread
This commit is contained in:
Andrew Kelley
2025-07-14 04:19:13 +02:00
committed by GitHub
3 changed files with 610 additions and 622 deletions

View File

@@ -3042,7 +3042,7 @@ fn flush(
// If there's an output file, it wants to decide where the LLVM object goes!
const sub_prog_node = comp.link_prog_node.start("LLVM Emit Object", 0);
defer sub_prog_node.end();
try llvm_object.emit(.{
try llvm_object.emit(.{ .zcu = zcu, .tid = tid }, .{
.pre_ir_path = comp.verbose_llvm_ir,
.pre_bc_path = comp.verbose_llvm_bc,

View File

@@ -9705,7 +9705,6 @@ fn funcCommon(
func_inst,
cc_src,
is_noinline,
is_generic,
);
}
@@ -9745,7 +9744,6 @@ fn funcCommon(
func_inst,
cc_src,
is_noinline,
is_generic,
);
}
@@ -9762,7 +9760,6 @@ fn funcCommon(
func_inst,
cc_src,
is_noinline,
is_generic,
);
}
@@ -9779,7 +9776,6 @@ fn finishFunc(
func_inst: Zir.Inst.Index,
cc_src: LazySrcLoc,
is_noinline: bool,
is_generic: bool,
) CompileError!Air.Inst.Ref {
const pt = sema.pt;
const zcu = pt.zcu;
@@ -9911,13 +9907,6 @@ fn finishFunc(
}),
}
if (!is_generic and sema.wantErrorReturnTracing(return_type)) {
// Make sure that StackTrace's fields are resolved so that the backend can
// lower this fn type.
const unresolved_stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);
try unresolved_stack_trace_ty.resolveFields(pt);
}
return Air.internedToRef(if (opt_func_index != .none) opt_func_index else func_ty);
}

File diff suppressed because it is too large Load Diff