This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: egcs at cygnus dot com
- Subject: Re: Loop unrolling
- From: Nathan Myers <ncm at nospam dot cantrip dot org>
- Date: Fri, 18 Sep 1998 16:03:11 -0700
- Newsgroups: cygnus.egcs
- Organization: http://www.cantrip.org/
- References: <199809171822.LAA23671@Canada.AI.SRI.COM>, <15996.906083317.cygnus.egcs@hurl.cygnus.com>
Jeffrey A Law wrote:
> > 2) Determining whether a loop is empty or not needs some kind of
> > register lifetime information. Last I looked, this was not
> > reliable at the time of loop unrolling. If this is no longer true,
> > then I can resurrect some code to do this.
> Maybe I misunderstood the kinds of loops people wanted to eliminate.
> I thought if they were empty there was nothing but an increment of
> the counter, and a condjump back to the counter increment.
Generally the kinds of "empty" loops that show up in template
expansions look something like:
for (i = 0; i < 0; ++i) *p++ = *q++;
or probably more frequently
for (i = 0; i < 10; ++i, ++p) { if (p); }
Nathan Myers
ncm@cantrip.org