Index: llvm/docs/LangRef.rst =================================================================== --- llvm/docs/LangRef.rst +++ llvm/docs/LangRef.rst @@ -2489,6 +2489,19 @@ ``fast`` This flag implies all of the others. +Forward-Progress Requirement +---------------------------- + +Every thread of execution is required to eventually cause a side-effect +(including but not limited to accessing of 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. + +In particular, infinite loops and infinite recursion without side-effects +result in undefined behavior. Language frontends that do not have a +forward-progress requirement should insert a call to `@llvm.sideeffect` as part +of every function definition and every loop. + .. _uselistorder: Use-list Order Directives