This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Dce & infinite loops


On Thu, 18 Mar 2004, Zdenek Dvorak wrote:

> > It is important to remove loops that are empty, but can be shown
> > to terminate. Even though programmers may not write such code,
> > other optimizations may make all code invariant, resulting in an
> > empty loop.
> 
> how often this happens? More precisely, could I see at least one
> real-world example?

See the previous discussions that resulted in the change to the section of
the manual explaining why we didn't remove empty loops, e.g.
<http://gcc.gnu.org/ml/gcc/1998-05/msg00651.html> and thread,
<http://gcc.gnu.org/ml/gcc/1998-06/msg00011.html> and (long) thread.  For
example, the example in <http://gcc.gnu.org/ml/gcc/1998-06/msg00089.html>
generates an empty loop just as it did in 1998, and the threads have other
examples.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]