News for hackers. Stuff that matters.
Re:“Pack it in, mathematicians, someone owes LLVM a million ... by detaro on Thursday August 19, 2021 @09:46AM (#28233761)
Compilers choose to not remove it in this case, probably because there is no clean way of making assumptions that provide a way out, unlike in the example from the link, but the core point is as I mentioned "making progress", specificall< the Progress guarantee (https://en.cppreference.com/w/cpp/language/memory_model#Prog...)

In a valid C++ program, every thread eventually does one of the following:

* terminate

* makes a call to an I/O library function

* performs an access through a volatile glvalue

* performs an atomic operation or a synchronization operation

It's fairly obvious how a loop that has none of these side-effects is thus a target to get turned into one that's guaranteed to terminate.

There are no comments on this comment yet.