[PATCH] D65718: [LangRef] Document forward-progress requirement

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 10:49:54 PDT 2019


efriedma added inline comments.


================
Comment at: llvm/docs/LangRef.rst:2497
+(including but not limited to accessing inaccessible memory, volatile or
+atomic memory access, or other forms of thread synchronization). Failure to
+cause a side-effect in a finite amount of time results in undefined behavior.
----------------
jfb wrote:
> A relaxed atomic load is a sufficient side-effect?
We want to consider a busy-wait loop like "while (foo){}", where "foo" is an atomic variable, as making forward progress; otherwise, there isn't any way to write such a loop.  We also want to allow erasing dead atomic loads.

We might need to modify the definition of a side-effect to make this work.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65718/new/

https://reviews.llvm.org/D65718





More information about the llvm-commits mailing list