This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: jfc at mit dot edu (John Carr)
- Subject: Re: Loop unrolling
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Tue, 2 Jun 98 14:48:08 PDT
- Cc: law at cygnus dot com, egcs at cygnus dot com
> > If you can provide source examples which show C++ & Java creating empty
> > loops behind the programmer's back it would go a long way to convincing
> > everyone that eliminating empty loops is a good idea.
>
> I sent this to RMS years ago during the original empty loop debate
> (1991?) but he had already made up his mind. I don't remember if I
> sent it to the gcc2 list.
>
> struct x
> {
> x() {}
> };
>
> f()
> {
> x x1[10];
> }
Yup. I suppose if anyone really cares about keeping RMS happy, loops
could be flagged as "the user wrote this loop" vs. "the compiler wrote
this loop".
This might also keep embedded programmers who believed the gcc manual
and wrote timing loops happy.