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
97517cc5b1
commit
ab7b167270
|
|
@ -1237,7 +1237,7 @@ const Emitter = struct {
|
||||||
|
|
||||||
fn markUses(a: Allocator, inst: module.Inst, used: []bool) void {
|
fn markUses(a: Allocator, inst: module.Inst, used: []bool) void {
|
||||||
const M = struct {
|
const M = struct {
|
||||||
var u: []bool = &.{};
|
threadlocal var u: []bool = &.{};
|
||||||
fn v(_: []const u32, x: Value) Value {
|
fn v(_: []const u32, x: Value) Value {
|
||||||
if (x == .inst) u[x.inst] = true;
|
if (x == .inst) u[x.inst] = true;
|
||||||
return x;
|
return x;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue