Re: Loop Unroll

Scott Moore <samiam@cisco.com>
21 May 2001 02:06:00 -0400

          From comp.compilers

Related articles
Loop Unroll lxh@arch.cs.pku.edu.cn (Alkaid) (2001-05-18)
Re: Loop Unroll mike@dimmick.demon.co.uk (Mike Dimmick) (2001-05-21)
Re: Loop Unroll gvmt@bgl.vsnl.net.in (Venkatesha Murthy G.) (2001-05-21)
Re: Loop Unroll samiam@cisco.com (Scott Moore) (2001-05-21)
Re: Loop Unroll rkrayhawk@aol.com (2001-05-21)
Re: Loop Unroll christian.bau@isltd.insignia.com (Christian Bau) (2001-05-22)
| List of all articles for this month |
From: Scott Moore <samiam@cisco.com>
Newsgroups: comp.compilers
Date: 21 May 2001 02:06:00 -0400
Organization: Cisco Systems Inc.
References: 01-05-046
Keywords: optimize, question, comment
Posted-Date: 21 May 2001 02:06:00 EDT

I'm probally showing my ignorance, but what are you saving by
splitting a loop into multiple separate loops ? Unrolling a loop saves
you the overhead of the loop code in time (but not storage). Splitting
a loop would not eliminate the overhead, but infact multiply that along
with the rest of the loop contents. I'm not sure how that qualifies
as loop unrolling at all.


Alkaid wrote:
> When we do ILP optimization, loop unrolling is a kind of method.
> But there is a question: if loop time is a big prime number, how to unroll
> the loop?
> e.g. when loop time is 100, I can unroll the loop 4 times to get a new one
> which has 25 iterations. What shall I do if the loop time is 101?
[It gives you more opportunity to schedule loads and stores. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.