back

by raphlinus·2y ago·view on hn ↗
They're related. Requiring sbrf to be acyclic is indeed one solution to the OOTA problem, but is arguably too heavy a hammer.

The other thing to say about OOTA is that it's usually referred to as a purely theoretical problem, but it is possible to imagine compiler optimization that would implicate it, for example using the storage location of the atomic to store a temporary value, knowing that it will be written later in program order anyway. That would be a perfectly reasonable thing to do in sequential code, but obviously a bad idea for atomics. Even so, experience shows that when it comes to letting compiler writers do optimizations that are obviously a bad idea, we have to explicitly and unambiguously forbid it in the spec.