[LLVMdev] Is infinite empty loop dead code?

Eli Friedman eli.friedman at gmail.com
Wed Nov 14 11:32:16 PST 2012


On Wed, Nov 14, 2012 at 11:24 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> Thank you all for the input. Seems that I have to prove a non-countable loop
> is finite before I can delete it.
>
> BTW, I think this draft is not clear as to what  is "constant expr". The
> source code may use symbolic value,
> but later on the symbolic value could be proved to be constant. However,
> compiler could mistakenly delete the loop before that
> point.

A "constant expression" in this context is defined by the C standard
to mean a literal value like "1", not a symbolic value.

-Eli



More information about the llvm-dev mailing list