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:
parent
01a66d456a
commit
5792d653b5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue