DXIL: keep the library prologue's use marks per thread

markUses kept the array it marks in a static, which concurrent library
compiles under --job shared: one could mark into another's array, or index
past its own. Make it thread-local.
This commit is contained in:
Peter Li 2026-11-01 21:24:31 -08:00 committed by peterino2
parent 97517cc5b1
commit ab7b167270
1 changed files with 1 additions and 1 deletions

View File

@ -1237,7 +1237,7 @@ const Emitter = struct {
fn markUses(a: Allocator, inst: module.Inst, used: []bool) void {
const M = struct {
var u: []bool = &.{};
threadlocal var u: []bool = &.{};
fn v(_: []const u32, x: Value) Value {
if (x == .inst) u[x.inst] = true;
return x;