diff options
Diffstat (limited to 'src/ast/effects.h')
-rw-r--r-- | src/ast/effects.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ast/effects.h b/src/ast/effects.h index 2db671b5e..1ae27d2a7 100644 --- a/src/ast/effects.h +++ b/src/ast/effects.h @@ -208,6 +208,24 @@ struct EffectAnalyzer : public PostWalker<EffectAnalyzer> { isAtomic = true; if (!ignoreImplicitTraps) implicitTrap = true; } + void visitAtomicWait(AtomicWait* curr) { + readsMemory = true; + // AtomicWait doesn't strictly write memory, but it does modify the waiters + // list associated with the specified address, which we can think of as a + // write. + writesMemory = true; + isAtomic = true; + if (!ignoreImplicitTraps) implicitTrap = true; + } + void visitAtomicWake(AtomicWake* curr) { + // AtomicWake doesn't strictly write memory, but it does modify the waiters + // list associated with the specified address, which we can think of as a + // write. + readsMemory = true; + writesMemory = true; + isAtomic = true; + if (!ignoreImplicitTraps) implicitTrap = true; + }; void visitUnary(Unary *curr) { if (!ignoreImplicitTraps) { switch (curr->op) { |