This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: Joe Buck <jbuck at synopsys dot com>, John Carr <jfc at mit dot edu>
- Subject: Re: Loop unrolling
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 3 Jun 1998 00:39:02 -0700
- Cc: law at cygnus dot com, egcs at cygnus dot com
- References: <199806021234.IAA16688@jfc.> <199806022148.OAA03667@atrus.synopsys.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Jun 02, 1998 at 02:48:08PM -0700, Joe Buck wrote:
> 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".
No, as I'd like to see things of the form
#define destroy_pte(PTR)
for (i = 0; i < PAGE_SIZE/sizeof(pte); ++i)
destroy_pte(base+i);
where destroy_pte is defined in some target-specific header, be
eliminated as well.
> This might also keep embedded programmers who believed the gcc manual
> and wrote timing loops happy.
How often does this occur do you think? Given that there are
any number of ways to write an empty loop that cannot be
removed, I would think this would not be much of an issue.
If someone actually bitches, I suppose we could provide a switch
to disable the optimization, but I would prefer that it be on by
default.
r~