Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/ir/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,15 @@ class EffectAnalyzer {
parent.isAtomic = true;
}
void visitStructWait(StructWait* curr) {
if (curr->ref->type.isNull()) {
parent.trap = true;
return;
}
parent.isAtomic = true;

// If the ref is null.
parent.implicitTrap = true;
if (curr->ref->type.isNullable()) {
parent.implicitTrap = true;
}

// If the timeout is negative and no-one wakes us.
parent.mayNotReturn = true;
Expand Down Expand Up @@ -984,10 +989,15 @@ class EffectAnalyzer {
.mutable_ == Mutable;
}
void visitStructNotify(StructNotify* curr) {
if (curr->ref->type.isNull()) {
parent.trap = true;
return;
}
parent.isAtomic = true;

// If the ref is null.
parent.implicitTrap = true;
if (curr->ref->type.isNullable()) {
parent.implicitTrap = true;
}

// struct.notify mutates an opaque waiter queue which isn't visible in
// user code. Model this as a struct write which prevents reorderings
Expand Down
Loading